projects
/
cascardo
/
linux.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
Merge branches 'bkl-removal', 'upstream' and 'upstream-fixes' into for-linus
[cascardo/linux.git]
/
drivers
/
regulator
/
wm8350-regulator.c
diff --git
a/drivers/regulator/wm8350-regulator.c
b/drivers/regulator/wm8350-regulator.c
index
17a00b0
..
768bd0e
100644
(file)
--- a/
drivers/regulator/wm8350-regulator.c
+++ b/
drivers/regulator/wm8350-regulator.c
@@
-1419,6
+1419,8
@@
int wm8350_register_regulator(struct wm8350 *wm8350, int reg,
{
struct platform_device *pdev;
int ret;
+ if (reg < 0 || reg >= NUM_WM8350_REGULATORS)
+ return -EINVAL;
if (wm8350->pmic.pdev[reg])
return -EBUSY;