summaryrefslogtreecommitdiff
path: root/drivers/leds
diff options
context:
space:
mode:
authorZhen Lei <thunder.leizhen@huawei.com>2021-05-15 06:06:46 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2021-07-20 17:17:41 +0300
commitfef8843d6f42e599660abb1bfb7e2d1c4d0ec39c (patch)
tree268e258098e0456778dfa8e553deede917cec226 /drivers/leds
parentbb16947765c0e7c43033b28463b66f4f6f86491c (diff)
downloadlinux-fef8843d6f42e599660abb1bfb7e2d1c4d0ec39c.tar.xz
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')
-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 9a257f969300..8109972998b7 100644
--- a/drivers/leds/leds-as3645a.c
+++ b/drivers/leds/leds-as3645a.c
@@ -564,6 +564,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;
}