summaryrefslogtreecommitdiffstats
path: root/drivers/leds/leds-as3645a.c
diff options
context:
space:
mode:
authorZhen Lei <thunder.leizhen@huawei.com>2021-05-15 11:06:46 +0800
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2021-07-20 16:15:57 +0200
commit21da01972675769d2908652e7785f5ce20254a7a (patch)
treee9a52ebfa57a362b4d82d2e4860e3ea7fad5bdb7 /drivers/leds/leds-as3645a.c
parent01b00e46253151d58a7db8ca3e1502ec1945a8d0 (diff)
downloadlinux-stable-21da01972675769d2908652e7785f5ce20254a7a.tar.gz
linux-stable-21da01972675769d2908652e7785f5ce20254a7a.tar.bz2
linux-stable-21da01972675769d2908652e7785f5ce20254a7a.zip
leds: as3645a: Fix error return code in as3645a_parse_node()
[ Upstream commit 96a30960a2c5246c8ffebe8a3c9031f9df094d97 ] Return error code -ENODEV rather than '0' when the indicator node can not be found. Fixes: a56ba8fbcb55 ("media: leds: as3645a: Add LED flash class driver") Reported-by: Hulk Robot <hulkci@huawei.com> Acked-by: Sakari Ailus <sakari.ailus@linux.intel.com> Signed-off-by: Zhen Lei <thunder.leizhen@huawei.com> Signed-off-by: Pavel Machek <pavel@ucw.cz> Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'drivers/leds/leds-as3645a.c')
-rw-r--r--drivers/leds/leds-as3645a.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/leds/leds-as3645a.c b/drivers/leds/leds-as3645a.c
index f883616d9e60..821944379f2c 100644
--- a/drivers/leds/leds-as3645a.c
+++ b/drivers/leds/leds-as3645a.c
@@ -565,6 +565,7 @@ static int as3645a_parse_node(struct as3645a *flash,
if (!flash->indicator_node) {
dev_warn(&flash->client->dev,
"can't find indicator node\n");
+ rval = -ENODEV;
goto out_err;
}