From: Jerome Brunet Date: Thu, 6 Sep 2018 13:59:04 +0000 (+0200) Subject: leds: pwm: silently error out on EPROBE_DEFER X-Git-Tag: v5.15~7616^2~8 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=9aec30371fb095a0c9415f3f0146ae269c3713d8;p=platform%2Fkernel%2Flinux-starfive.git 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 Signed-off-by: Jacek Anaszewski --- diff --git a/drivers/leds/leds-pwm.c b/drivers/leds/leds-pwm.c index df80c89..5d3faae 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; }