diff options
Diffstat (limited to 'drivers/leds')
-rw-r--r-- | drivers/leds/leds-mc13783.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/leds/leds-mc13783.c b/drivers/leds/leds-mc13783.c index c61e8c4f5469..8bc491541550 100644 --- a/drivers/leds/leds-mc13783.c +++ b/drivers/leds/leds-mc13783.c | |||
@@ -275,7 +275,7 @@ static int __devinit mc13783_led_probe(struct platform_device *pdev) | |||
275 | return -ENODEV; | 275 | return -ENODEV; |
276 | } | 276 | } |
277 | 277 | ||
278 | if (pdata->num_leds < 1 || pdata->num_leds > MC13783_LED_MAX) { | 278 | if (pdata->num_leds < 1 || pdata->num_leds > (MC13783_LED_MAX + 1)) { |
279 | dev_err(&pdev->dev, "Invalid led count %d\n", pdata->num_leds); | 279 | dev_err(&pdev->dev, "Invalid led count %d\n", pdata->num_leds); |
280 | return -EINVAL; | 280 | return -EINVAL; |
281 | } | 281 | } |