Skip to content
Snippets Groups Projects
Commit 2d226cf6 authored by Markus Armbruster's avatar Markus Armbruster
Browse files

qdev: Ignore Error objects where the return value suffices


Signed-off-by: default avatarMarkus Armbruster <armbru@redhat.com>
Reviewed-by: default avatarEric Blake <eblake@redhat.com>
Message-Id: <20200707160613.848843-45-armbru@redhat.com>
parent 9e194e06
No related branches found
No related tags found
No related merge requests found
......@@ -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;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment