From: Wei Yongjun Date: Mon, 29 Apr 2013 23:17:54 +0000 (-0700) Subject: drivers/video/backlight/adp8870_bl.c: fix error return code in adp8870_led_probe() X-Git-Tag: firefly_0821_release~3680^2~660^2~241 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=514f920a4a37bce427ec4aab591619b158e29115;p=firefly-linux-kernel-4.4.55.git 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 --- 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; }