aboutsummaryrefslogtreecommitdiff
path: root/qdev-monitor.c
diff options
context:
space:
mode:
authorEduardo Habkost <ehabkost@redhat.com>2014-11-01 13:56:10 -0200
committerAndreas Färber <afaerber@suse.de>2014-11-04 17:50:00 +0100
commit5185f0e0a6bb076cd1cd0115ef785298a97a71fe (patch)
treee5983ebae9f9e4aba84279e23caa042e016fd6da /qdev-monitor.c
parent43c95d782d6cc2297b6235d9ecb1f66f08e9928a (diff)
downloadqemu-arm-5185f0e0a6bb076cd1cd0115ef785298a97a71fe.tar.gz
qdev: Move error printing to the end of qdev_device_help()
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com> Signed-off-by: Andreas Färber <afaerber@suse.de>
Diffstat (limited to 'qdev-monitor.c')
-rw-r--r--qdev-monitor.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/qdev-monitor.c b/qdev-monitor.c
index 982f3f4c09..a9702d89c2 100644
--- a/qdev-monitor.c
+++ b/qdev-monitor.c
@@ -245,9 +245,7 @@ int qdev_device_help(QemuOpts *opts)
prop_list = qmp_device_list_properties(driver, &local_err);
if (local_err) {
- error_printf("%s\n", error_get_pretty(local_err));
- error_free(local_err);
- return 1;
+ goto error;
}
for (prop = prop_list; prop; prop = prop->next) {
@@ -263,6 +261,11 @@ int qdev_device_help(QemuOpts *opts)
qapi_free_DevicePropertyInfoList(prop_list);
return 1;
+
+error:
+ error_printf("%s\n", error_get_pretty(local_err));
+ error_free(local_err);
+ return 1;
}
static Object *qdev_get_peripheral(void)