Skip to content

Commit 96a3096

Browse files
Zhen Leipavelmachek
authored andcommitted
leds: as3645a: Fix error return code in as3645a_parse_node()
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>
1 parent 9d0150d commit 96a3096

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

‎drivers/leds/leds-as3645a.c‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -545,6 +545,7 @@ static int as3645a_parse_node(struct as3645a *flash,
545545
if (!flash->indicator_node) {
546546
dev_warn(&flash->client->dev,
547547
"can't find indicator node\n");
548+
rval = -ENODEV;
548549
goto out_err;
549550
}
550551

0 commit comments

Comments
 (0)