diff --git a/commands/menu.c b/commands/menu.c index 9ec2d579b..e1079fd51 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;