leds: gpio: Add kernel log if devm_fwnode_gpiod_get() fails
authorStefan Wahren <wahrenst@gmx.net>
Sat, 2 Dec 2023 18:36:36 +0000 (19:36 +0100)
committerLee Jones <lee@kernel.org>
Wed, 13 Dec 2023 15:45:55 +0000 (15:45 +0000)
commite7431bd7899c955e126c742fe608512f7e2e111a
tree854b3d10050081471b2465803c39159d41f3d63e
parent78da55c804cb9fb4ef3f839f4b284542a59b1a45
leds: gpio: Add kernel log if devm_fwnode_gpiod_get() fails

In case leds-gpio fails to get at least one of possibly many GPIOs
from the DT (e.g. the GPIO is already requested) neither gpiolib nor
the driver does provide any helpful error log:

    leds-gpio: probe of leds failed with error -16

As the driver knows better how to handle errors with such mandatory
GPIOs, let's implement an error log which points to the affected
GPIO.

Signed-off-by: Stefan Wahren <wahrenst@gmx.net>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Link: https://lore.kernel.org/r/20231202183636.7055-1-wahrenst@gmx.net
Signed-off-by: Lee Jones <lee@kernel.org>
drivers/leds/leds-gpio.c