diff mbox

[01/10] commit: Fix error handling

Message ID 1488817322-11397-2-git-send-email-kwolf@redhat.com
State New
Headers show

Commit Message

Kevin Wolf March 6, 2017, 4:21 p.m. UTC
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>
---
 block/commit.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Philippe Mathieu-Daudé March 6, 2017, 4:44 p.m. UTC | #1
On 03/06/2017 01:21 PM, Kevin Wolf wrote:
> 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: Philippe Mathieu-Daudé <f4bug@amsat.org>

> ---
>  block/commit.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> 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;
>      }
>
diff mbox

Patch

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;
     }