diff options
Diffstat (limited to 'net/net.c')
-rw-r--r-- | net/net.c | 8 |
1 files changed, 2 insertions, 6 deletions
@@ -1062,7 +1062,6 @@ static int net_client_init(QemuOpts *opts, bool is_netdev, Error **errp) { gchar **substrings = NULL; Netdev *object = NULL; - Error *err = NULL; int ret = -1; Visitor *v = opts_visitor_new(opts); @@ -1110,16 +1109,13 @@ static int net_client_init(QemuOpts *opts, bool is_netdev, Error **errp) qemu_opts_set_id(opts, g_strdup_printf("__org.qemu.net%i", idx++)); } - visit_type_Netdev(v, NULL, &object, &err); - - if (!err) { - ret = net_client_init1(object, is_netdev, &err); + if (visit_type_Netdev(v, NULL, &object, errp)) { + ret = net_client_init1(object, is_netdev, errp); } qapi_free_Netdev(object); out: - error_propagate(errp, err); g_strfreev(substrings); visit_free(v); return ret; |