From a5f9b9df252d0dfb407178ef4c3769f78a64b2ff Mon Sep 17 00:00:00 2001 From: Markus Armbruster Date: Tue, 7 Jul 2020 18:06:05 +0200 Subject: error: Reduce unnecessary error propagation When all we do with an Error we receive into a local variable is propagating to somewhere else, we can just as well receive it there right away, even when we need to keep error_propagate() for other error paths. Signed-off-by: Markus Armbruster Reviewed-by: Eric Blake Message-Id: <20200707160613.848843-38-armbru@redhat.com> --- hw/core/qdev.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'hw/core/qdev.c') diff --git a/hw/core/qdev.c b/hw/core/qdev.c index 68948761f2..01796823b4 100644 --- a/hw/core/qdev.c +++ b/hw/core/qdev.c @@ -871,7 +871,7 @@ static void device_set_realized(Object *obj, bool value, Error **errp) } if (value && !dev->realized) { - if (!check_only_migratable(obj, &local_err)) { + if (!check_only_migratable(obj, errp)) { goto fail; } -- cgit 1.4.1