aboutsummaryrefslogtreecommitdiff
path: root/hw
diff options
context:
space:
mode:
Diffstat (limited to 'hw')
-rw-r--r--hw/acpi/core.c5
-rw-r--r--hw/block/xen-block.c6
-rw-r--r--hw/core/numa.c7
3 files changed, 7 insertions, 11 deletions
diff --git a/hw/acpi/core.c b/hw/acpi/core.c
index 8b240c3e09..f6d9ec4f13 100644
--- a/hw/acpi/core.c
+++ b/hw/acpi/core.c
@@ -239,7 +239,6 @@ static void acpi_table_install(const char unsigned *blob, size_t bloblen,
void acpi_table_add(const QemuOpts *opts, Error **errp)
{
AcpiTableOptions *hdrs = NULL;
- Error *err = NULL;
char **pathnames = NULL;
char **cur;
size_t bloblen = 0;
@@ -249,11 +248,11 @@ void acpi_table_add(const QemuOpts *opts, Error **errp)
Visitor *v;
v = opts_visitor_new(opts);
- visit_type_AcpiTableOptions(v, NULL, &hdrs, &err);
+ visit_type_AcpiTableOptions(v, NULL, &hdrs, errp);
visit_free(v);
}
- if (err) {
+ if (!hdrs) {
goto out;
}
if (hdrs->has_file == hdrs->has_data) {
diff --git a/hw/block/xen-block.c b/hw/block/xen-block.c
index 96c6c009c7..a775fba7c0 100644
--- a/hw/block/xen-block.c
+++ b/hw/block/xen-block.c
@@ -682,11 +682,9 @@ static char *xen_block_blockdev_add(const char *id, QDict *qdict,
trace_xen_block_blockdev_add(node_name);
v = qobject_input_visitor_new(QOBJECT(qdict));
- visit_type_BlockdevOptions(v, NULL, &options, &local_err);
+ visit_type_BlockdevOptions(v, NULL, &options, errp);
visit_free(v);
-
- if (local_err) {
- error_propagate(errp, local_err);
+ if (!options) {
goto fail;
}
diff --git a/hw/core/numa.c b/hw/core/numa.c
index 1b3267a607..d1a94a14f8 100644
--- a/hw/core/numa.c
+++ b/hw/core/numa.c
@@ -516,10 +516,10 @@ static int parse_numa(void *opaque, QemuOpts *opts, Error **errp)
Error *err = NULL;
Visitor *v = opts_visitor_new(opts);
- visit_type_NumaOptions(v, NULL, &object, &err);
+ visit_type_NumaOptions(v, NULL, &object, errp);
visit_free(v);
- if (err) {
- goto end;
+ if (!object) {
+ return -1;
}
/* Fix up legacy suffix-less format */
@@ -530,7 +530,6 @@ static int parse_numa(void *opaque, QemuOpts *opts, Error **errp)
set_numa_options(ms, object, &err);
-end:
qapi_free_NumaOptions(object);
if (err) {
error_propagate(errp, err);