From: Kevin Wolf Date: Fri, 3 Mar 2017 15:54:21 +0000 (+0100) Subject: commit: Fix error handling X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=b247767aacdc2cfba94050c901aec268be94cc2d;p=qemu.git commit: Fix error handling Apparently some kind of mismerge happened in commit 8dfba279, which broke the error handling without any real reason by removing the assignment of the return value to ret in a blk_insert_bs() call. Signed-off-by: Kevin Wolf Reviewed-by: Fam Zheng Reviewed-by: Philippe Mathieu-Daudé --- diff --git a/block/commit.c b/block/commit.c index 22a0a4db98..e57c1cffa2 100644 --- a/block/commit.c +++ b/block/commit.c @@ -364,7 +364,7 @@ void commit_start(const char *job_id, BlockDriverState *bs, /* Required permissions are already taken with block_job_add_bdrv() */ s->top = blk_new(0, BLK_PERM_ALL); - blk_insert_bs(s->top, top, errp); + ret = blk_insert_bs(s->top, top, errp); if (ret < 0) { goto fail; }