From 53618dd83885cc551a3833e228cf714494602142 Mon Sep 17 00:00:00 2001 From: Kevin Wolf Date: Fri, 25 May 2018 14:48:16 +0200 Subject: vdi: Fix vdi_co_do_create() return value .bdrv_co_create() is supposed to return 0 on success, but vdi could return a positive value instead. Fix this. Signed-off-by: Kevin Wolf Reviewed-by: Max Reitz Reviewed-by: Jeff Cody --- block/vdi.c | 1 + 1 file changed, 1 insertion(+) (limited to 'block') diff --git a/block/vdi.c b/block/vdi.c index 96a22b8e83..668af0a828 100644 --- a/block/vdi.c +++ b/block/vdi.c @@ -865,6 +865,7 @@ static int coroutine_fn vdi_co_do_create(BlockdevCreateOptions *create_options, } } + ret = 0; exit: blk_unref(blk); bdrv_unref(bs_file); -- cgit v1.2.3