From dc9c10a1f42235a7f8411feca28984c4e7da3177 Mon Sep 17 00:00:00 2001 From: Vladimir Sementsov-Ogievskiy Date: Tue, 2 Feb 2021 15:49:47 +0300 Subject: block: drop extra error propagation for bdrv_set_backing_hd bdrv_set_backing_hd now returns status, let's use it. Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Greg Kurz Reviewed-by: Alberto Garcia Message-Id: <20210202124956.63146-6-vsementsov@virtuozzo.com> Signed-off-by: Eric Blake --- block.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'block.c') diff --git a/block.c b/block.c index a1f3cecd75..933ff49b10 100644 --- a/block.c +++ b/block.c @@ -2995,11 +2995,9 @@ int bdrv_open_backing_file(BlockDriverState *bs, QDict *parent_options, /* Hook up the backing file link; drop our reference, bs owns the * backing_hd reference now */ - bdrv_set_backing_hd(bs, backing_hd, &local_err); + ret = bdrv_set_backing_hd(bs, backing_hd, errp); bdrv_unref(backing_hd); - if (local_err) { - error_propagate(errp, local_err); - ret = -EINVAL; + if (ret < 0) { goto free_exit; } -- cgit v1.2.3