leds: as3645a: Fix error return code in as3645a_parse_node()
authorZhen Lei <thunder.leizhen@huawei.com>
Sat, 15 May 2021 03:06:46 +0000 (11:06 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 14 Jul 2021 15:07:44 +0000 (17:07 +0200)
commit2f0b82e12dbcbea6fd52db23958bc417fe2743bb
tree3b77aaf8c150f44e255316094cb5ba91ab1d0cea
parent3a75092cac53e4e82390f8808eebcb4be73d23cb
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>
drivers/leds/leds-as3645a.c