diff options
Diffstat (limited to 'drivers/regulator')
-rw-r--r-- | drivers/regulator/wm8350-regulator.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/regulator/wm8350-regulator.c b/drivers/regulator/wm8350-regulator.c index 1f44b17e23b1..c68c496b2c49 100644 --- a/drivers/regulator/wm8350-regulator.c +++ b/drivers/regulator/wm8350-regulator.c | |||
@@ -1380,6 +1380,13 @@ int wm8350_register_regulator(struct wm8350 *wm8350, int reg, | |||
1380 | if (wm8350->pmic.pdev[reg]) | 1380 | if (wm8350->pmic.pdev[reg]) |
1381 | return -EBUSY; | 1381 | return -EBUSY; |
1382 | 1382 | ||
1383 | if (reg >= WM8350_DCDC_1 && reg <= WM8350_DCDC_6 && | ||
1384 | reg > wm8350->pmic.max_dcdc) | ||
1385 | return -ENODEV; | ||
1386 | if (reg >= WM8350_ISINK_A && reg <= WM8350_ISINK_B && | ||
1387 | reg > wm8350->pmic.max_isink) | ||
1388 | return -ENODEV; | ||
1389 | |||
1383 | pdev = platform_device_alloc("wm8350-regulator", reg); | 1390 | pdev = platform_device_alloc("wm8350-regulator", reg); |
1384 | if (!pdev) | 1391 | if (!pdev) |
1385 | return -ENOMEM; | 1392 | return -ENOMEM; |