diff options
Diffstat (limited to 'drivers/regulator')
-rw-r--r-- | drivers/regulator/wm8350-regulator.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/regulator/wm8350-regulator.c b/drivers/regulator/wm8350-regulator.c index 7aa35248181b..5056e23e4414 100644 --- a/drivers/regulator/wm8350-regulator.c +++ b/drivers/regulator/wm8350-regulator.c | |||
@@ -1435,7 +1435,7 @@ int wm8350_register_led(struct wm8350 *wm8350, int lednum, int dcdc, int isink, | |||
1435 | struct platform_device *pdev; | 1435 | struct platform_device *pdev; |
1436 | int ret; | 1436 | int ret; |
1437 | 1437 | ||
1438 | if (lednum > ARRAY_SIZE(wm8350->pmic.led) || lednum < 0) { | 1438 | if (lednum >= ARRAY_SIZE(wm8350->pmic.led) || lednum < 0) { |
1439 | dev_err(wm8350->dev, "Invalid LED index %d\n", lednum); | 1439 | dev_err(wm8350->dev, "Invalid LED index %d\n", lednum); |
1440 | return -ENODEV; | 1440 | return -ENODEV; |
1441 | } | 1441 | } |