aboutsummaryrefslogtreecommitdiff
path: root/block/commit.c
diff options
context:
space:
mode:
authorKevin Wolf <kwolf@redhat.com>2017-03-03 16:54:21 +0100
committerKevin Wolf <kwolf@redhat.com>2017-03-07 14:53:28 +0100
commitb247767aacdc2cfba94050c901aec268be94cc2d (patch)
tree6584385431aaa5319ad3e73da624c5d0a08a89d1 /block/commit.c
parentff79d5e939c38677a575e3493eb9b4d36eb21865 (diff)
downloadqemu-b247767aacdc2cfba94050c901aec268be94cc2d.zip
qemu-b247767aacdc2cfba94050c901aec268be94cc2d.tar.gz
qemu-b247767aacdc2cfba94050c901aec268be94cc2d.tar.bz2
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 <kwolf@redhat.com> Reviewed-by: Fam Zheng <famz@redhat.com> Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Diffstat (limited to 'block/commit.c')
-rw-r--r--block/commit.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/block/commit.c b/block/commit.c
index 22a0a4d..e57c1cf 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;
}