diff mbox

[02/14] vhdx: Fix vhdx_co_create() return value

Message ID 20180525163327.23097-3-kwolf@redhat.com (mailing list archive)
State New, archived
Headers show

Commit Message

Kevin Wolf May 25, 2018, 4:33 p.m. UTC
.bdrv_co_create() is supposed to return 0 on success, but vhdx could
return a positive value instead. Fix this.

Signed-off-by: Kevin Wolf <kwolf@redhat.com>
---
 block/vhdx.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Max Reitz May 29, 2018, 10:40 a.m. UTC | #1
On 2018-05-25 18:33, Kevin Wolf wrote:
> .bdrv_co_create() is supposed to return 0 on success, but vhdx could
> return a positive value instead. Fix this.
> 
> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
> ---
>  block/vhdx.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

Reviewed-by: Max Reitz <mreitz@redhat.com>
Jeff Cody May 29, 2018, 2:44 p.m. UTC | #2
On Fri, May 25, 2018 at 06:33:15PM +0200, Kevin Wolf wrote:
> .bdrv_co_create() is supposed to return 0 on success, but vhdx could
> return a positive value instead. Fix this.
> 
> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
> ---
>  block/vhdx.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/block/vhdx.c b/block/vhdx.c
> index 0b1e21c750..b1ba121bb6 100644
> --- a/block/vhdx.c
> +++ b/block/vhdx.c
> @@ -1951,7 +1951,7 @@ static int coroutine_fn vhdx_co_create(BlockdevCreateOptions *opts,
>          goto delete_and_exit;
>      }
>  
> -
> +    ret = 0;
>  delete_and_exit:
>      blk_unref(blk);
>      bdrv_unref(bs);
> -- 
> 2.13.6
> 
> 

Reviewed-by: Jeff Cody <jcody@redhat.com>
diff mbox

Patch

diff --git a/block/vhdx.c b/block/vhdx.c
index 0b1e21c750..b1ba121bb6 100644
--- a/block/vhdx.c
+++ b/block/vhdx.c
@@ -1951,7 +1951,7 @@  static int coroutine_fn vhdx_co_create(BlockdevCreateOptions *opts,
         goto delete_and_exit;
     }
 
-
+    ret = 0;
 delete_and_exit:
     blk_unref(blk);
     bdrv_unref(bs);