aboutsummaryrefslogtreecommitdiff
path: root/qdev-monitor.c
diff options
context:
space:
mode:
authorMarkus Armbruster <armbru@redhat.com>2020-07-07 18:05:35 +0200
committerMarkus Armbruster <armbru@redhat.com>2020-07-10 15:01:06 +0200
commitc6ecec43b240b545ef2f1d6eed5b1e539dfdb2c1 (patch)
tree5114a8cc8f4a6b4e7e81a9ca63e54236126c4fae /qdev-monitor.c
parent79c3e2bc6e78eb9cb197a9b3a9fc885ec1b7c720 (diff)
qemu-option: Check return value instead of @err where convenient
Convert uses like opts = qemu_opts_create(..., &err); if (err) { ... } to opts = qemu_opts_create(..., errp); if (!opts) { ... } Eliminate error_propagate() that are now unnecessary. Delete @err that are now unused. Note that we can't drop parallels_open()'s error_propagate() here. We continue to execute it even in the converted case. It's a no-op then: local_err is null. Signed-off-by: Markus Armbruster <armbru@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Reviewed-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com> Reviewed-by: Greg Kurz <groug@kaod.org> Message-Id: <20200707160613.848843-8-armbru@redhat.com>
Diffstat (limited to 'qdev-monitor.c')
-rw-r--r--qdev-monitor.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/qdev-monitor.c b/qdev-monitor.c
index cefd21b8e6..cbcbbb5d50 100644
--- a/qdev-monitor.c
+++ b/qdev-monitor.c
@@ -802,9 +802,8 @@ void qmp_device_add(QDict *qdict, QObject **ret_data, Error **errp)
QemuOpts *opts;
DeviceState *dev;
- opts = qemu_opts_from_qdict(qemu_find_opts("device"), qdict, &local_err);
- if (local_err) {
- error_propagate(errp, local_err);
+ opts = qemu_opts_from_qdict(qemu_find_opts("device"), qdict, errp);
+ if (!opts) {
return;
}
if (!monitor_cur_is_qmp() && qdev_device_help(opts)) {