From 621ff94d5074d88253a5818c6b9c4db718fbfc65 Mon Sep 17 00:00:00 2001 From: Eduardo Habkost Date: Mon, 13 Jun 2016 18:57:56 -0300 Subject: error: Remove NULL checks on error_propagate() calls error_propagate() already ignores local_err==NULL, so there's no need to check it before calling. Coccinelle patch used to perform the changes added to scripts/coccinelle/error_propagate_null.cocci. Reviewed-by: Eric Blake Acked-by: Cornelia Huck Reviewed-by: Markus Armbruster Signed-off-by: Eduardo Habkost Message-Id: <1465855078-19435-2-git-send-email-ehabkost@redhat.com> Signed-off-by: Markus Armbruster --- hw/ide/qdev.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'hw/ide/qdev.c') diff --git a/hw/ide/qdev.c b/hw/ide/qdev.c index 4bc74a32d2..6842a5596a 100644 --- a/hw/ide/qdev.c +++ b/hw/ide/qdev.c @@ -233,9 +233,7 @@ static void ide_dev_set_bootindex(Object *obj, Visitor *v, const char *name, d->unit ? "/disk@1" : "/disk@0"); } out: - if (local_err) { - error_propagate(errp, local_err); - } + error_propagate(errp, local_err); } static void ide_dev_instance_init(Object *obj) -- cgit v1.2.3