]> git.proxmox.com Git - mirror_qemu.git/commitdiff
commit: Fix error handling
authorKevin Wolf <kwolf@redhat.com>
Fri, 3 Mar 2017 15:54:21 +0000 (16:54 +0100)
committerKevin Wolf <kwolf@redhat.com>
Tue, 7 Mar 2017 13:53:28 +0000 (14:53 +0100)
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 <kwolf@redhat.com>
Reviewed-by: Fam Zheng <famz@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
block/commit.c

index 22a0a4db98869219d2c9ae388e02db79106a02d6..e57c1cffa22f37dd11a74a0ea96ad88eaf82049a 100644 (file)
@@ -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;
     }