diff options
Diffstat (limited to 'hw/net/ne2000-isa.c')
-rw-r--r-- | hw/net/ne2000-isa.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/hw/net/ne2000-isa.c b/hw/net/ne2000-isa.c index fdf8faa0d9..a878056426 100644 --- a/hw/net/ne2000-isa.c +++ b/hw/net/ne2000-isa.c @@ -113,9 +113,8 @@ static void isa_ne2000_set_bootindex(Object *obj, Visitor *v, int32_t boot_index; Error *local_err = NULL; - visit_type_int32(v, name, &boot_index, &local_err); - if (local_err) { - goto out; + if (!visit_type_int32(v, name, &boot_index, errp)) { + return; } /* check whether bootindex is present in fw_boot_order list */ check_boot_index(boot_index, &local_err); @@ -134,7 +133,7 @@ static void isa_ne2000_instance_init(Object *obj) object_property_add(obj, "bootindex", "int32", isa_ne2000_get_bootindex, isa_ne2000_set_bootindex, NULL, NULL); - object_property_set_int(obj, -1, "bootindex", NULL); + object_property_set_int(obj, "bootindex", -1, NULL); } static const TypeInfo ne2000_isa_info = { .name = TYPE_ISA_NE2000, |