leds: class: The -ENOTSUPP should never be seen by user space
authorAndy Shevchenko <andy.shevchenko@gmail.com>
Mon, 10 May 2021 09:50:18 +0000 (12:50 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 14 Jul 2021 14:56:39 +0000 (16:56 +0200)
commitb504e279e5029f9b5e0e1f4f68f8fd6675d48ff6
treea9bb72501b361e9c0ca24a8547ca981c8904a1df
parent58279b341b9422d73bee1b10a7fa7f4dca006142
leds: class: The -ENOTSUPP should never be seen by user space

[ Upstream commit 0ac40af86077982a5346dbc9655172d2775d6b08 ]

Drop the bogus error code and let of_led_get() to take care about absent
of_node.

Fixes: e389240ad992 ("leds: Add managed API to get a LED from a device driver")
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Signed-off-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Signed-off-by: Pavel Machek <pavel@ucw.cz>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/leds/led-class.c