aboutsummaryrefslogtreecommitdiff
path: root/block
diff options
context:
space:
mode:
authorMarkus Armbruster <armbru@redhat.com>2020-07-07 18:05:47 +0200
committerMarkus Armbruster <armbru@redhat.com>2020-07-10 15:18:08 +0200
commit14217038bc9e36246d311fa8e026a01a5d7bbd42 (patch)
treec93af897bda7a8789e91d09eb89a035bbe4bcff0 /block
parent62a35aaa310807fa161ca041ddb0f308faeb582b (diff)
qapi: Use returned bool to check for failure, manual part
The previous commit used Coccinelle to convert from checking the Error object to checking the return value. Convert a few more manually. Also tweak control flow in places to conform to the conventional "if error bail out" pattern. Signed-off-by: Markus Armbruster <armbru@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Reviewed-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com> Message-Id: <20200707160613.848843-20-armbru@redhat.com>
Diffstat (limited to 'block')
-rw-r--r--block/throttle-groups.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/block/throttle-groups.c b/block/throttle-groups.c
index bb242fde1a..e411051160 100644
--- a/block/throttle-groups.c
+++ b/block/throttle-groups.c
@@ -895,8 +895,8 @@ static void throttle_group_set_limits(Object *obj, Visitor *v,
ThrottleLimits *argp;
Error *local_err = NULL;
- if (!visit_type_ThrottleLimits(v, name, &argp, &local_err)) {
- goto ret;
+ if (!visit_type_ThrottleLimits(v, name, &argp, errp)) {
+ return;
}
qemu_mutex_lock(&tg->lock);
throttle_get_config(&tg->ts, &cfg);
@@ -908,7 +908,6 @@ static void throttle_group_set_limits(Object *obj, Visitor *v,
unlock:
qemu_mutex_unlock(&tg->lock);
-ret:
qapi_free_ThrottleLimits(argp);
error_propagate(errp, local_err);
return;