menu: do not go to free if there's nothing to free
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
This commit is contained in:
parent
f50d2063cb
commit
c0477d8233
|
@ -80,9 +80,8 @@ static int do_menu_entry_add(struct cmd_menu *cm)
|
|||
}
|
||||
|
||||
me = menu_entry_alloc();
|
||||
|
||||
if (!me)
|
||||
goto free;
|
||||
return -ENOMEM;
|
||||
|
||||
if (cm->submenu) {
|
||||
me->action = menu_action_show;
|
||||
|
|
Loading…
Reference in New Issue