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 14:56:48 +0000 (16:56 +0200)
commit53cb671592efe10c993674bc7657e19192471679
treef4b28396c8608cac2145d91ee61e2e394e9cd763
parentf3bf888507f0e7f6daf39e3cf0cefa2edf963778
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