Skip to content

Commit

Permalink
leds: as3645a: Fix error return code in as3645a_parse_node()
Browse files Browse the repository at this point in the history
[ Upstream commit 96a3096 ]

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

Fixes: a56ba8f ("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>
  • Loading branch information
Zhen Lei authored and gregkh committed Jul 14, 2021
1 parent 3a75092 commit 2f0b82e
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions drivers/leds/leds-as3645a.c
Original file line number Diff line number Diff line change
Expand Up @@ -545,6 +545,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;
}

Expand Down

0 comments on commit 2f0b82e

Please sign in to comment.