diff options
author | Krzysztof Kozlowski <krzk@kernel.org> | 2020-08-26 16:47:46 +0200 |
---|---|---|
committer | Thierry Reding <thierry.reding@gmail.com> | 2020-09-24 09:18:11 +0200 |
commit | 793bb636f549da85d1fe68228428e5e11d7db22e (patch) | |
tree | 635c6a19fe3bdb44f3487a1602e2c98ea5ece9bb /drivers/pwm/pwm-sprd.c | |
parent | 5530fcaf9ca30b85cfe03c6fb98ec1b1ea189e6d (diff) | |
download | linux-793bb636f549da85d1fe68228428e5e11d7db22e.tar.bz2 |
pwm: sprd: Simplify with dev_err_probe()
Common pattern of handling deferred probe can be simplified with
dev_err_probe(). Less code and also it prints the error value.
Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
Acked-by: Chunyan Zhang <zhang.lyra@gmail.com>
Acked-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Thierry Reding <thierry.reding@gmail.com>
Diffstat (limited to 'drivers/pwm/pwm-sprd.c')
-rw-r--r-- | drivers/pwm/pwm-sprd.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/drivers/pwm/pwm-sprd.c b/drivers/pwm/pwm-sprd.c index be2394227423..5123d948efd6 100644 --- a/drivers/pwm/pwm-sprd.c +++ b/drivers/pwm/pwm-sprd.c @@ -228,11 +228,8 @@ static int sprd_pwm_clk_init(struct sprd_pwm_chip *spc) if (ret == -ENOENT) break; - if (ret != -EPROBE_DEFER) - dev_err(spc->dev, - "failed to get channel clocks\n"); - - return ret; + return dev_err_probe(spc->dev, ret, + "failed to get channel clocks\n"); } clk_pwm = chn->clks[SPRD_PWM_CHN_OUTPUT_CLK].clk; |