diff options
author | Wei Yongjun <yongjun_wei@trendmicro.com.cn> | 2013-04-30 01:17:54 +0200 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2013-04-30 03:28:17 +0200 |
commit | 514f920a4a37bce427ec4aab591619b158e29115 (patch) | |
tree | 720af9879f56490f407ae057712acaba16ffca58 /drivers/video/backlight/adp8870_bl.c | |
parent | drivers/video/backlight/adp8860_bl.c: fix error return code in adp8860_led_pr... (diff) | |
download | linux-514f920a4a37bce427ec4aab591619b158e29115.tar.xz linux-514f920a4a37bce427ec4aab591619b158e29115.zip |
drivers/video/backlight/adp8870_bl.c: fix error return code in adp8870_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>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers/video/backlight/adp8870_bl.c')
-rw-r--r-- | drivers/video/backlight/adp8870_bl.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/video/backlight/adp8870_bl.c b/drivers/video/backlight/adp8870_bl.c index 302c8009a7dc..90049d7b5c60 100644 --- a/drivers/video/backlight/adp8870_bl.c +++ b/drivers/video/backlight/adp8870_bl.c @@ -274,12 +274,14 @@ static int adp8870_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; } |