From 14217038bc9e36246d311fa8e026a01a5d7bbd42 Mon Sep 17 00:00:00 2001 From: Markus Armbruster Date: Tue, 7 Jul 2020 18:05:47 +0200 Subject: 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 Reviewed-by: Eric Blake Reviewed-by: Vladimir Sementsov-Ogievskiy Message-Id: <20200707160613.848843-20-armbru@redhat.com> --- hw/ide/qdev.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'hw/ide/qdev.c') diff --git a/hw/ide/qdev.c b/hw/ide/qdev.c index 358f10a92e..ba8b0d7f02 100644 --- a/hw/ide/qdev.c +++ b/hw/ide/qdev.c @@ -245,8 +245,8 @@ static void ide_dev_set_bootindex(Object *obj, Visitor *v, const char *name, int32_t boot_index; Error *local_err = NULL; - if (!visit_type_int32(v, name, &boot_index, &local_err)) { - goto out; + if (!visit_type_int32(v, name, &boot_index, errp)) { + return; } /* check whether bootindex is present in fw_boot_order list */ check_boot_index(boot_index, &local_err); -- cgit v1.2.3