aboutsummaryrefslogtreecommitdiff
path: root/drivers/video
diff options
context:
space:
mode:
authorWei Yongjun <yongjun_wei@trendmicro.com.cn>2013-04-29 16:17:53 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2013-04-29 18:28:17 -0700
commit84eba9ed709198cda09c14a16c499a45d88a63ea (patch)
treea1d2ed6053bbaa4c1159a1ad196116de6fd95290 /drivers/video
parent6a7aeb1ae8d8b15073f730ad7828c4b53f1402c3 (diff)
drivers/video/backlight/adp8860_bl.c: fix error return code in adp8860_led_probe()
Fix to return a negative error code from the error handling case instead of zero, as returned elsewhere in this function. Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn> Acked-by: Jingoo Han <jg1.han@samsung.com> Acked-by: Michael Hennerich <michael.hennerich@analog.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers/video')
-rw-r--r--drivers/video/backlight/adp8860_bl.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/video/backlight/adp8860_bl.c b/drivers/video/backlight/adp8860_bl.c
index 6bb7f3644b3..75b10f87612 100644
--- a/drivers/video/backlight/adp8860_bl.c
+++ b/drivers/video/backlight/adp8860_bl.c
@@ -249,12 +249,14 @@ static int adp8860_led_probe(struct i2c_client *client)
if (led_dat->id > 7 || led_dat->id < 1) {
dev_err(&client->dev, "Invalid LED ID %d\n",
led_dat->id);
+ ret = -EINVAL;
goto err;
}
if (pdata->bl_led_assign & (1 << (led_dat->id - 1))) {
dev_err(&client->dev, "LED %d used by Backlight\n",
led_dat->id);
+ ret = -EBUSY;
goto err;
}