From 514f920a4a37bce427ec4aab591619b158e29115 Mon Sep 17 00:00:00 2001 From: Wei Yongjun Date: Mon, 29 Apr 2013 16:17:54 -0700 Subject: 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 Acked-by: Jingoo Han Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- drivers/video/backlight/adp8870_bl.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'drivers/video/backlight/adp8870_bl.c') 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; } -- cgit v1.2.3