mirror of
https://source.denx.de/u-boot/u-boot.git
synced 2026-06-13 15:03:58 +03:00
The last entry of bootmenu is always set for exiting the menu, and its command is set to an empty string. When user selects to quit the menu, bootmenu will try to run this empty command. However run_command() with empty cmd string will return failure, and the return value will be overridden to BOOTMENU_RET_FAIL, not the expected BOOTMENU_RET_QUIT. This patch adds a default success value to the cmd_ret variable, and makes sure run_command() is called only when the menu command is not empty. Reviewed-by: Simon Glass <sjg@chromium.org> Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>