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>
This commit is contained in:
Wei Yongjun 2013-04-29 16:17:53 -07:00 коммит произвёл Linus Torvalds
Родитель 6a7aeb1ae8
Коммит 84eba9ed70
1 изменённых файлов: 2 добавлений и 0 удалений

Просмотреть файл

@ -249,12 +249,14 @@ static int adp8860_led_probe(struct i2c_client *client)
if (led_dat->id > 7 || led_dat->id < 1) { if (led_dat->id > 7 || led_dat->id < 1) {
dev_err(&client->dev, "Invalid LED ID %d\n", dev_err(&client->dev, "Invalid LED ID %d\n",
led_dat->id); led_dat->id);
ret = -EINVAL;
goto err; goto err;
} }
if (pdata->bl_led_assign & (1 << (led_dat->id - 1))) { if (pdata->bl_led_assign & (1 << (led_dat->id - 1))) {
dev_err(&client->dev, "LED %d used by Backlight\n", dev_err(&client->dev, "LED %d used by Backlight\n",
led_dat->id); led_dat->id);
ret = -EBUSY;
goto err; goto err;
} }