[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v3 43/44] qdev: Ignore Error objects where the return value suffi
From: |
Markus Armbruster |
Subject: |
[PATCH v3 43/44] qdev: Ignore Error objects where the return value suffices |
Date: |
Mon, 6 Jul 2020 10:09:49 +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 9d52c0c0f4..31c59aa80a 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 v3 41/44] error: Avoid error_propagate() after migrate_add_blocker(), (continued)
- [PATCH v3 41/44] error: Avoid error_propagate() after migrate_add_blocker(), Markus Armbruster, 2020/07/06
- [PATCH v3 44/44] hmp: Ignore Error objects where the return value suffices, Markus Armbruster, 2020/07/06
- [PATCH v3 32/44] error: Avoid unnecessary error_propagate() after error_setg(), Markus Armbruster, 2020/07/06
- [PATCH v3 28/44] qom: Use returned bool to check for failure, manual part, Markus Armbruster, 2020/07/06
- [PATCH v3 35/44] error: Eliminate error_propagate() manually, Markus Armbruster, 2020/07/06
- [PATCH v3 25/44] qom: Put name parameter before value / visitor parameter, Markus Armbruster, 2020/07/06
- Re: [PATCH v3 00/44] Less clumsy error checking, Markus Armbruster, 2020/07/06
- [PATCH v3 43/44] qdev: Ignore Error objects where the return value suffices,
Markus Armbruster <=
- [PATCH v3 42/44] qemu-img: Ignore Error objects where the return value suffices, Markus Armbruster, 2020/07/06
- [PATCH v3 37/44] block/parallels: Simplify parallels_open() after previous commit, Markus Armbruster, 2020/07/06
- [PATCH v3 33/44] error: Eliminate error_propagate() with Coccinelle, part 1, Markus Armbruster, 2020/07/06