mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-08-27 19:29:37 +00:00
leds: as3645a: Fix error return code in as3645a_parse_node()
[ Upstream commit96a30960a2
] Return error code -ENODEV rather than '0' when the indicator node can not be found. Fixes:a56ba8fbcb
("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>
This commit is contained in:
parent
f0acb12b98
commit
95288e28c7
1 changed files with 1 additions and 0 deletions
|
@ -544,6 +544,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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue