提交 7a2fbedc 编写于 作者: Z Zhen Lei 提交者: Zheng Zengkai

leds: as3645a: Fix error return code in as3645a_parse_node()

stable inclusion
from stable-5.10.50
commit 53cb671592efe10c993674bc7657e19192471679
bugzilla: 174522 https://gitee.com/openeuler/kernel/issues/I4DNFY

Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=53cb671592efe10c993674bc7657e19192471679

--------------------------------

[ Upstream commit 96a30960 ]

Return error code -ENODEV rather than '0' when the indicator node can not
be found.

Fixes: a56ba8fb ("media: leds: as3645a: Add LED flash class driver")
Reported-by: NHulk Robot <hulkci@huawei.com>
Acked-by: NSakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: NZhen Lei <thunder.leizhen@huawei.com>
Signed-off-by: NPavel Machek <pavel@ucw.cz>
Signed-off-by: NSasha Levin <sashal@kernel.org>
Signed-off-by: NChen Jun <chenjun102@huawei.com>
Acked-by: NWeilong Chen <chenweilong@huawei.com>
Signed-off-by: NChen Jun <chenjun102@huawei.com>
Signed-off-by: NZheng Zengkai <zhengzengkai@huawei.com>
上级 2195a832
...@@ -545,6 +545,7 @@ static int as3645a_parse_node(struct as3645a *flash, ...@@ -545,6 +545,7 @@ static int as3645a_parse_node(struct as3645a *flash,
if (!flash->indicator_node) { if (!flash->indicator_node) {
dev_warn(&flash->client->dev, dev_warn(&flash->client->dev,
"can't find indicator node\n"); "can't find indicator node\n");
rval = -ENODEV;
goto out_err; goto out_err;
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册