summaryrefslogtreecommitdiffstats
path: root/commands
diff options
context:
space:
mode:
Diffstat (limited to 'commands')
-rw-r--r--commands/boot.c7
-rw-r--r--commands/menu.c2
2 files changed, 6 insertions, 3 deletions
diff --git a/commands/boot.c b/commands/boot.c
index bd1be4ba75..c091b2e1fa 100644
--- a/commands/boot.c
+++ b/commands/boot.c
@@ -52,10 +52,13 @@ static int boot_script(char *path)
goto out;
}
- data.verbose = verbose;
- data.dryrun = dryrun;
bootm_data_init_defaults(&data);
+ if (verbose)
+ data.verbose = verbose;
+ if (dryrun)
+ data.dryrun = dryrun;
+
ret = bootm_boot(&data);
if (ret)
pr_err("Booting %s failed: %s\n", basename(path), strerror(-ret));
diff --git a/commands/menu.c b/commands/menu.c
index 9ec2d579b7..e1079fd51e 100644
--- a/commands/menu.c
+++ b/commands/menu.c
@@ -83,7 +83,7 @@ static int do_menu_entry_add(struct cmd_menu *cm)
else
me = menu_add_command_entry(m, cm->description, cm->command,
cm->type);
- if (!me)
+ if (IS_ERR(me))
return PTR_ERR(me);
me->box_state = cm->box_state > 0 ? 1 : 0;