diff mbox series

[V2,3/3] pwm: bcm2835: suppress error message during deferred probe

Message ID 1566655788-24949-4-git-send-email-wahrenst@gmx.net (mailing list archive)
State New, archived
Headers show
Series pwm: bcm2835: Minor fixes | expand

Commit Message

Stefan Wahren Aug. 24, 2019, 2:09 p.m. UTC
This suppresses error messages in case the PWM clock isn't ready yet.

Signed-off-by: Stefan Wahren <wahrenst@gmx.net>
---
 drivers/pwm/pwm-bcm2835.c | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

--
2.7.4

Comments

Uwe Kleine-König Aug. 24, 2019, 3:13 p.m. UTC | #1
On Sat, Aug 24, 2019 at 04:09:48PM +0200, Stefan Wahren wrote:
> This suppresses error messages in case the PWM clock isn't ready yet.
> 
> Signed-off-by: Stefan Wahren <wahrenst@gmx.net>
Reviewed-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>

Thanks
Uwe
diff mbox series

Patch

diff --git a/drivers/pwm/pwm-bcm2835.c b/drivers/pwm/pwm-bcm2835.c
index 2c82386..91e24f0 100644
--- a/drivers/pwm/pwm-bcm2835.c
+++ b/drivers/pwm/pwm-bcm2835.c
@@ -153,8 +153,11 @@  static int bcm2835_pwm_probe(struct platform_device *pdev)

 	pc->clk = devm_clk_get(&pdev->dev, NULL);
 	if (IS_ERR(pc->clk)) {
-		dev_err(&pdev->dev, "clock not found: %ld\n", PTR_ERR(pc->clk));
-		return PTR_ERR(pc->clk);
+		ret = PTR_ERR(pc->clk);
+		if (ret != -EPROBE_DEFER)
+			dev_err(&pdev->dev, "clock not found: %d\n", ret);
+
+		return ret;
 	}

 	ret = clk_prepare_enable(pc->clk);