power: reset: reboot-mode: fix normal mode setup

If cmd is empty in get_reboot_mode_magic, we should return normal magic.

Change-Id: I10931adc49e33f72ae73d9471159f82cc02ff0c0
Signed-off-by: Huang, Tao <huangtao@rock-chips.com>
This commit is contained in:
Huang, Tao
2016-07-28 10:59:22 +08:00
parent bcb4ce870a
commit 8090be7aeb

View File

@@ -36,7 +36,7 @@ static int get_reboot_mode_magic(struct reboot_mode_driver *reboot,
int magic = 0;
struct mode_info *info;
if (!cmd)
if (!cmd || !cmd[0])
cmd = normal;
list_for_each_entry(info, &reboot->head, list) {