Skip to content
Snippets Groups Projects
Commit eae74537 authored by Łukasz Majewski's avatar Łukasz Majewski Committed by Tom Rini
Browse files

power: fix: Do not execute pmic command when not all necessary parameters are passed


Lack of this check resulted in a data abort when CPU tried to execute the
following command (without further mandatory input): 'pmic MAX77686_PMIC'.

Only the 'pmic list' command requires one passed parameter.
Other require at least two valid parameters for correct operation.

Signed-off-by: default avatarLukasz Majewski <l.majewski@samsung.com>
parent 6445262c
No related branches found
No related tags found
No related merge requests found
......@@ -140,6 +140,9 @@ int do_pmic(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
return CMD_RET_SUCCESS;
}
if (argc < 3)
return CMD_RET_USAGE;
name = argv[1];
cmd = argv[2];
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment