Commit 9aec3037 authored by Jerome Brunet's avatar Jerome Brunet Committed by Jacek Anaszewski

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: default avatarJerome Brunet <jbrunet@baylibre.com>
Signed-off-by: default avatarJacek Anaszewski <jacek.anaszewski@gmail.com>
parent f813eec9
...@@ -100,8 +100,9 @@ static int led_pwm_add(struct device *dev, struct led_pwm_priv *priv, ...@@ -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); led_data->pwm = devm_pwm_get(dev, led->name);
if (IS_ERR(led_data->pwm)) { if (IS_ERR(led_data->pwm)) {
ret = PTR_ERR(led_data->pwm); ret = PTR_ERR(led_data->pwm);
dev_err(dev, "unable to request PWM for %s: %d\n", if (ret != -EPROBE_DEFER)
led->name, ret); dev_err(dev, "unable to request PWM for %s: %d\n",
led->name, ret);
return ret; return ret;
} }
......
Markdown is supported
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