diff options
Diffstat (limited to 'drivers/regulator/wm8350-regulator.c')
-rw-r--r-- | drivers/regulator/wm8350-regulator.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/regulator/wm8350-regulator.c b/drivers/regulator/wm8350-regulator.c index 17a00b0fafd1..768bd0e5b48b 100644 --- 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, | |||
1419 | { | 1419 | { |
1420 | struct platform_device *pdev; | 1420 | struct platform_device *pdev; |
1421 | int ret; | 1421 | int ret; |
1422 | if (reg < 0 || reg >= NUM_WM8350_REGULATORS) | ||
1423 | return -EINVAL; | ||
1422 | 1424 | ||
1423 | if (wm8350->pmic.pdev[reg]) | 1425 | if (wm8350->pmic.pdev[reg]) |
1424 | return -EBUSY; | 1426 | return -EBUSY; |