aboutsummaryrefslogtreecommitdiff
path: root/qom/object.c
diff options
context:
space:
mode:
authorEduardo Habkost <ehabkost@redhat.com>2016-06-13 18:57:56 -0300
committerMarkus Armbruster <armbru@redhat.com>2016-06-20 16:38:13 +0200
commit621ff94d5074d88253a5818c6b9c4db718fbfc65 (patch)
tree471a14faadcea9b57a834801610e2079264e4920 /qom/object.c
parentda002526ac30f679b0c797b0d71102dcdf200fe6 (diff)
downloadqemu-621ff94d5074d88253a5818c6b9c4db718fbfc65.zip
qemu-621ff94d5074d88253a5818c6b9c4db718fbfc65.tar.gz
qemu-621ff94d5074d88253a5818c6b9c4db718fbfc65.tar.bz2
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 <eblake@redhat.com> Acked-by: Cornelia Huck <cornelia.huck@de.ibm.com> Reviewed-by: Markus Armbruster <armbru@redhat.com> Signed-off-by: Eduardo Habkost <ehabkost@redhat.com> Message-Id: <1465855078-19435-2-git-send-email-ehabkost@redhat.com> Signed-off-by: Markus Armbruster <armbru@redhat.com>
Diffstat (limited to 'qom/object.c')
-rw-r--r--qom/object.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/qom/object.c b/qom/object.c
index 0311414..9743ea4 100644
--- a/qom/object.c
+++ b/qom/object.c
@@ -549,9 +549,7 @@ Object *object_new_with_propv(const char *typename,
return obj;
error:
- if (local_err) {
- error_propagate(errp, local_err);
- }
+ error_propagate(errp, local_err);
object_unref(obj);
return NULL;
}