diff options
author | Jerome Brunet <jbrunet@baylibre.com> | 2018-09-06 16:59:04 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2019-01-13 11:51:08 +0300 |
commit | eb05c02903a76c3bba0bd4eebe34fa684b0ca759 (patch) | |
tree | 77a50b552670f6cecc3dc7cf677e98b559ea87d4 /drivers/leds | |
parent | ae5c75e660e2fece83b8e5aca52ffcfd79e752eb (diff) | |
download | linux-eb05c02903a76c3bba0bd4eebe34fa684b0ca759.tar.xz |
leds: pwm: silently error out on EPROBE_DEFER
commit 9aec30371fb095a0c9415f3f0146ae269c3713d8 upstream.
When probing, if we fail to get the pwm due to probe deferal, we shouldn't
print an error message. Just be silent in this case.
Signed-off-by: Jerome Brunet <jbrunet@baylibre.com>
Signed-off-by: Jacek Anaszewski <jacek.anaszewski@gmail.com>
Cc: Benjamin Drung <bdrung@debian.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/leds')
-rw-r--r-- | drivers/leds/leds-pwm.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/leds/leds-pwm.c b/drivers/leds/leds-pwm.c index df80c89ebe7f..5d3faae51d59 100644 --- a/drivers/leds/leds-pwm.c +++ b/drivers/leds/leds-pwm.c @@ -100,8 +100,9 @@ static int led_pwm_add(struct device *dev, struct led_pwm_priv *priv, led_data->pwm = devm_pwm_get(dev, led->name); if (IS_ERR(led_data->pwm)) { ret = PTR_ERR(led_data->pwm); - dev_err(dev, "unable to request PWM for %s: %d\n", - led->name, ret); + if (ret != -EPROBE_DEFER) + dev_err(dev, "unable to request PWM for %s: %d\n", + led->name, ret); return ret; } |