[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v4 44/45] qdev: Ignore Error objects where the return value suffi
From: |
Markus Armbruster |
Subject: |
[PATCH v4 44/45] qdev: Ignore Error objects where the return value suffices |
Date: |
Tue, 7 Jul 2020 18:06:12 +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 2bec8a80b8..098298c78e 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;
}
--
2.26.2
- [PATCH v4 38/45] block/parallels: Simplify parallels_open() after previous commit, (continued)
- [PATCH v4 38/45] block/parallels: Simplify parallels_open() after previous commit, Markus Armbruster, 2020/07/07
- [PATCH v4 32/45] qdev: Use returned bool to check for failure, Coccinelle part, Markus Armbruster, 2020/07/07
- [PATCH v4 40/45] qapi: Smooth visitor error checking in generated code, Markus Armbruster, 2020/07/07
- [PATCH v4 42/45] error: Avoid error_propagate() after migrate_add_blocker(), Markus Armbruster, 2020/07/07
- [PATCH v4 34/45] error: Eliminate error_propagate() with Coccinelle, part 1, Markus Armbruster, 2020/07/07
- [PATCH v4 28/45] qom: Use returned bool to check for failure, Coccinelle part, Markus Armbruster, 2020/07/07
- [PATCH v4 33/45] error: Avoid unnecessary error_propagate() after error_setg(), Markus Armbruster, 2020/07/07
- [PATCH v4 35/45] error: Eliminate error_propagate() with Coccinelle, part 2, Markus Armbruster, 2020/07/07
- [PATCH v4 36/45] error: Eliminate error_propagate() manually, Markus Armbruster, 2020/07/07
- [PATCH v4 26/45] qom: Put name parameter before value / visitor parameter, Markus Armbruster, 2020/07/07
- [PATCH v4 44/45] qdev: Ignore Error objects where the return value suffices,
Markus Armbruster <=
- [PATCH v4 41/45] qapi: Purge error_propagate() from QAPI core, Markus Armbruster, 2020/07/07
- [PATCH v4 17/45] qapi: Make visitor functions taking Error ** return bool, not void, Markus Armbruster, 2020/07/07
- [PATCH v4 22/45] qom: Rename qdev_get_type() to object_get_type(), Markus Armbruster, 2020/07/07
- [PATCH v4 45/45] hmp: Ignore Error objects where the return value suffices, Markus Armbruster, 2020/07/07
- [PATCH v4 37/45] error: Reduce unnecessary error propagation, Markus Armbruster, 2020/07/07
- [PATCH v4 39/45] qapi: Smooth another visitor error checking pattern, Markus Armbruster, 2020/07/07
- [PATCH v4 21/45] qom: Use error_reportf_err() instead of g_printerr() in examples, Markus Armbruster, 2020/07/07
- [PATCH v4 02/45] error: Improve error.h's big comment, Markus Armbruster, 2020/07/07