diff options
author | Markus Armbruster <armbru@redhat.com> | 2020-07-07 18:06:12 +0200 |
---|---|---|
committer | Markus Armbruster <armbru@redhat.com> | 2020-07-10 15:18:09 +0200 |
commit | 2d226cf6d18c853a3dca3fae1442be399caa2e6f (patch) | |
tree | 7116d3c88c8723ab7d38d766489ed0ade64c3780 | |
parent | 9e194e063f813b95bc01e69a5357c1c341ee93c5 (diff) | |
download | qemu-2d226cf6d18c853a3dca3fae1442be399caa2e6f.zip qemu-2d226cf6d18c853a3dca3fae1442be399caa2e6f.tar.gz qemu-2d226cf6d18c853a3dca3fae1442be399caa2e6f.tar.bz2 |
qdev: Ignore Error objects where the return value suffices
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Message-Id: <20200707160613.848843-45-armbru@redhat.com>
-rw-r--r-- | hw/core/qdev-properties.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/hw/core/qdev-properties.c b/hw/core/qdev-properties.c index 2bec8a8..098298c 100644 --- a/hw/core/qdev-properties.c +++ b/hw/core/qdev-properties.c @@ -742,7 +742,6 @@ static void set_pci_devfn(Object *obj, Visitor *v, const char *name, Property *prop = opaque; int32_t value, *ptr = qdev_get_prop_ptr(dev, prop); unsigned int slot, fn, n; - Error *local_err = NULL; char *str; if (dev->realized) { @@ -750,9 +749,7 @@ static void set_pci_devfn(Object *obj, Visitor *v, const char *name, return; } - if (!visit_type_str(v, name, &str, &local_err)) { - error_free(local_err); - local_err = NULL; + if (!visit_type_str(v, name, &str, NULL)) { if (!visit_type_int32(v, name, &value, errp)) { return; } |