diff options
Diffstat (limited to 'hw/usb')
-rw-r--r-- | hw/usb/dev-storage.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/hw/usb/dev-storage.c b/hw/usb/dev-storage.c index f5977eb72e..1c3bd2578c 100644 --- a/hw/usb/dev-storage.c +++ b/hw/usb/dev-storage.c @@ -736,8 +736,7 @@ static void usb_msd_set_bootindex(Object *obj, Visitor *v, const char *name, int32_t boot_index; Error *local_err = NULL; - visit_type_int32(v, name, &boot_index, &local_err); - if (local_err) { + if (!visit_type_int32(v, name, &boot_index, &local_err)) { goto out; } /* check whether bootindex is present in fw_boot_order list */ |