diff options
author | Markus Armbruster <armbru@redhat.com> | 2020-07-22 10:40:47 +0200 |
---|---|---|
committer | Markus Armbruster <armbru@redhat.com> | 2020-10-09 08:36:23 +0200 |
commit | 2155ceaf25662aa53cdb9dec3d7e9458bad4f0e0 (patch) | |
tree | 82796e3e22368aea5163f4acc02a9971cd247b68 /hw | |
parent | 497d415d76b9f59fcae27f22df1ca2c3fa4df64e (diff) | |
download | qemu-2155ceaf25662aa53cdb9dec3d7e9458bad4f0e0.zip qemu-2155ceaf25662aa53cdb9dec3d7e9458bad4f0e0.tar.gz qemu-2155ceaf25662aa53cdb9dec3d7e9458bad4f0e0.tar.bz2 |
error: Remove NULL checks on error_propagate() calls (again)
Patch created mechanically by rerunning:
$ spatch --sp-file scripts/coccinelle/error_propagate_null.cocci \
--macro-file scripts/cocci-macro-file.h \
--use-gitgrep .
Cc: Jens Freimann <jfreimann@redhat.com>
Cc: Hailiang Zhang <zhang.zhanghailiang@huawei.com>
Cc: Juan Quintela <quintela@redhat.com>
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Message-Id: <20200722084048.1726105-4-armbru@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Diffstat (limited to 'hw')
-rw-r--r-- | hw/net/virtio-net.c | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/hw/net/virtio-net.c b/hw/net/virtio-net.c index 7bf27b9..a160a9d 100644 --- a/hw/net/virtio-net.c +++ b/hw/net/virtio-net.c @@ -817,9 +817,7 @@ static void failover_add_primary(VirtIONet *n, Error **errp) "sure primary device has parameter" " failover_pair_id=<virtio-net-id>\n"); } - if (err) { - error_propagate(errp, err); - } + error_propagate(errp, err); } static int is_my_primary(void *opaque, QemuOpts *opts, Error **errp) @@ -873,9 +871,7 @@ static DeviceState *virtio_connect_failover_devices(VirtIONet *n, n->primary_device_id = g_strdup(prim_dev->id); n->primary_device_opts = prim_dev->opts; } else { - if (err) { - error_propagate(errp, err); - } + error_propagate(errp, err); } return prim_dev; |