[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v2 43/44] qdev: Ignore Error objects where the return value suffi
From: |
Markus Armbruster |
Subject: |
[PATCH v2 43/44] qdev: Ignore Error objects where the return value suffices |
Date: |
Thu, 2 Jul 2020 17:49:59 +0200 |
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
---
hw/core/qdev-properties.c | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/hw/core/qdev-properties.c b/hw/core/qdev-properties.c
index e1ad147339..8eb4283a56 100644
--- a/hw/core/qdev-properties.c
+++ b/hw/core/qdev-properties.c
@@ -653,7 +653,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) {
@@ -661,9 +660,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;
}
--
2.26.2
- [PATCH v2 17/44] qapi: Use returned bool to check for failure, Coccinelle part, (continued)
- [PATCH v2 17/44] qapi: Use returned bool to check for failure, Coccinelle part, Markus Armbruster, 2020/07/02
- [PATCH v2 20/44] s390x/pci: Fix harmless mistake in zpci's property fid's setter, Markus Armbruster, 2020/07/02
- [PATCH v2 36/44] error: Eliminate error_propagate() manually, Markus Armbruster, 2020/07/02
- [PATCH v2 25/44] qom: Use return values to check for error where that's simpler, Markus Armbruster, 2020/07/02
- [PATCH v2 43/44] qdev: Ignore Error objects where the return value suffices,
Markus Armbruster <=
- [PATCH v2 41/44] error: Avoid error_propagate() after migrate_add_blocker(), Markus Armbruster, 2020/07/02
- [PATCH v2 12/44] qemu-option: Make functions taking Error ** return bool, not void, Markus Armbruster, 2020/07/02
- [PATCH v2 14/44] block: Avoid error accumulation in bdrv_img_create(), Markus Armbruster, 2020/07/02
- [PATCH v2 23/44] qom: Crash more nicely on object_property_get_link() failure, Markus Armbruster, 2020/07/02