[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 34/44] error: Eliminate error_propagate() with Coccinelle, part 1, Markus Armbruster, 2020/07/02
- [PATCH v2 37/44] error: Reduce unnecessary error propagation, Markus Armbruster, 2020/07/02
- [PATCH v2 42/44] qemu-img: Ignore Error objects where the return value suffices, Markus Armbruster, 2020/07/02
- [PATCH v2 43/44] qdev: Ignore Error objects where the return value suffices,
Markus Armbruster <=
- [PATCH v2 13/44] qemu-option: Use returned bool to check for failure, Markus Armbruster, 2020/07/02
- [PATCH v2 10/44] qemu-option: Factor out helper opt_create(), Markus Armbruster, 2020/07/02
- [PATCH v2 31/44] qdev: Make functions taking Error ** return bool, not void, Markus Armbruster, 2020/07/02
- [PATCH v2 21/44] qom: Use error_reportf_err() instead of g_printerr() in examples, Markus Armbruster, 2020/07/02
- [PATCH v2 19/44] block/parallels: Simplify parallels_open() after previous commit, Markus Armbruster, 2020/07/02