diff options
author | Jerome Brunet <jbrunet@baylibre.com> | 2017-05-23 18:05:03 +0200 |
---|---|---|
committer | Thierry Reding <thierry.reding@gmail.com> | 2017-07-06 08:29:16 +0200 |
commit | 93c292ef3cbb46db78853763fc4d9a5b9dfb97d5 (patch) | |
tree | 2c97eaef062b525f6c77b7d4469d15ffacedd074 /drivers/pwm | |
parent | pwm: Standardize document format (diff) | |
download | linux-93c292ef3cbb46db78853763fc4d9a5b9dfb97d5.tar.xz linux-93c292ef3cbb46db78853763fc4d9a5b9dfb97d5.zip |
pwm: Silently error out on EPROBE_DEFER
In of_pwm_get(), if we fail to get the PWM chip 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>
Reviewed-by: Andreas Färber <afaerber@suse.de>
Signed-off-by: Thierry Reding <thierry.reding@gmail.com>
Diffstat (limited to 'drivers/pwm')
-rw-r--r-- | drivers/pwm/core.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/pwm/core.c b/drivers/pwm/core.c index a0860b30bd93..1581f6ab1b1f 100644 --- a/drivers/pwm/core.c +++ b/drivers/pwm/core.c @@ -678,7 +678,9 @@ struct pwm_device *of_pwm_get(struct device_node *np, const char *con_id) pc = of_node_to_pwmchip(args.np); if (IS_ERR(pc)) { - pr_err("%s(): PWM chip not found\n", __func__); + if (PTR_ERR(pc) != -EPROBE_DEFER) + pr_err("%s(): PWM chip not found\n", __func__); + pwm = ERR_CAST(pc); goto put; } |