Skip to content
Commit afb48153 authored by Jean-Jacques Hiblot's avatar Jean-Jacques Hiblot Committed by Lee Jones
Browse files

leds: Provide devm_of_led_get_optional()



Add an optional variant of devm_of_led_get(). It behaves the same as
devm_of_led_get() except where the LED doesn't exist. In this case,
instead of returning -ENOENT, the function returns NULL.

Signed-off-by: default avatarJean-Jacques Hiblot <jjhiblot@traphandler.com>
Reviewed-by: default avatarAndy Shevchenko <andy.shevchenko@gmail.com>
Link: https://lore.kernel.org/r/20230728153731.3742339-2-jjhiblot@traphandler.com
Signed-off-by: default avatarLee Jones <lee@kernel.org>
parent 179507fc
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment