summaryrefslogtreecommitdiff
path: root/drivers/regulator/wm8350-regulator.c
diff options
context:
space:
mode:
authorRoel Kluin <roel.kluin@gmail.com>2009-01-17 18:06:40 +0300
committerLiam Girdwood <lrg@slimlogic.co.uk>2009-01-31 00:50:49 +0300
commit8dd2c9e3128a5784a01084b52d5bb7efd4371ac6 (patch)
tree3e23e2c5b0238a10419ca984cec0d85a84d5a827 /drivers/regulator/wm8350-regulator.c
parent9bf503e6bec3f2d28298808454eebde031ab5b5b (diff)
downloadlinux-8dd2c9e3128a5784a01084b52d5bb7efd4371ac6.tar.xz
leds: Fix bounds checking of wm8350->pmic.led
Fix bounds checking of wm8350->pmic.led Signed-off-by: Roel Kluin <roel.kluin@gmail.com> Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
Diffstat (limited to 'drivers/regulator/wm8350-regulator.c')
-rw-r--r--drivers/regulator/wm8350-regulator.c2
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,
struct platform_device *pdev;
int ret;
- if (lednum > ARRAY_SIZE(wm8350->pmic.led) || lednum < 0) {
+ if (lednum >= ARRAY_SIZE(wm8350->pmic.led) || lednum < 0) {
dev_err(wm8350->dev, "Invalid LED index %d\n", lednum);
return -ENODEV;
}