Skip to content

Commit

Permalink
leds: pwm: silently error out on EPROBE_DEFER
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Jerome Brunet authored and Jacek Anaszewski committed Sep 8, 2018
1 parent f813eec commit 9aec303
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions drivers/leds/leds-pwm.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down

0 comments on commit 9aec303

Please sign in to comment.