projects
/
project
/
bcm63xx
/
u-boot.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
6445262
)
power: fix: Do not execute pmic command when not all necessary parameters are passed
author
Łukasz Majewski
<l.majewski@samsung.com>
Mon, 24 Feb 2014 12:33:08 +0000
(13:33 +0100)
committer
Tom Rini
<trini@ti.com>
Mon, 24 Feb 2014 15:56:33 +0000
(10:56 -0500)
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: Lukasz Majewski <l.majewski@samsung.com>
drivers/power/power_core.c
patch
|
blob
|
history
diff --git
a/drivers/power/power_core.c
b/drivers/power/power_core.c
index 29ccc831af2d80c3bcc4cadb5f80b95170088015..fe1f3160218342cd30db9f10f103216a4b3d4ad4 100644
(file)
--- a/
drivers/power/power_core.c
+++ b/
drivers/power/power_core.c
@@
-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];