Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 514f920a authored by Wei Yongjun's avatar Wei Yongjun Committed by Linus Torvalds
Browse files

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: default avatarWei Yongjun <yongjun_wei@trendmicro.com.cn>
Acked-by: default avatarJingoo Han <jg1.han@samsung.com>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent 84eba9ed
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -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;
		}