aboutsummaryrefslogtreecommitdiff
path: root/bootdevice.c
diff options
context:
space:
mode:
Diffstat (limited to 'bootdevice.c')
-rw-r--r--bootdevice.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/bootdevice.c b/bootdevice.c
index 0ff55e2b79..fb09d3c668 100644
--- a/bootdevice.c
+++ b/bootdevice.c
@@ -297,8 +297,7 @@ static void device_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 */