diff options
Diffstat (limited to 'monitor')
-rw-r--r-- | monitor/monitor.c | 19 |
1 files changed, 6 insertions, 13 deletions
diff --git a/monitor/monitor.c b/monitor/monitor.c index 19dcb8fbe3..b385a3d569 100644 --- a/monitor/monitor.c +++ b/monitor/monitor.c @@ -657,25 +657,18 @@ int monitor_init_opts(QemuOpts *opts, Error **errp) { Visitor *v; MonitorOptions *options; - Error *local_err = NULL; + int ret; v = opts_visitor_new(opts); - visit_type_MonitorOptions(v, NULL, &options, &local_err); + visit_type_MonitorOptions(v, NULL, &options, errp); visit_free(v); - - if (local_err) { - goto out; + if (!options) { + return -1; } - monitor_init(options, true, &local_err); + ret = monitor_init(options, true, errp); qapi_free_MonitorOptions(options); - -out: - if (local_err) { - error_propagate(errp, local_err); - return -1; - } - return 0; + return ret; } QemuOptsList qemu_mon_opts = { |