summaryrefslogtreecommitdiffstats
path: root/drivers/leds/leds-pwm.c
diff options
context:
space:
mode:
authorJerome Brunet <jbrunet@baylibre.com>2018-09-06 15:59:04 +0200
committerJacek Anaszewski <jacek.anaszewski@gmail.com>2018-09-08 22:47:15 +0200
commit9aec30371fb095a0c9415f3f0146ae269c3713d8 (patch)
tree51cf90791cd7d176d1a9dc444cf92f673f0bd35d /drivers/leds/leds-pwm.c
parentf813eec972ee32f69e3a8be3512cb6ba266d7d64 (diff)
downloadtalos-op-linux-9aec30371fb095a0c9415f3f0146ae269c3713d8.tar.gz
talos-op-linux-9aec30371fb095a0c9415f3f0146ae269c3713d8.zip
leds: pwm: silently error out on EPROBE_DEFER
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>
Diffstat (limited to 'drivers/leds/leds-pwm.c')
-rw-r--r--drivers/leds/leds-pwm.c5
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;
}
OpenPOWER on IntegriCloud