linux-watchdog.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH  1/1] watchdog: stm32_iwdg: don't print an error on probe deferral
@ 2020-11-06  9:46 Christophe Roullier
  2020-11-06  9:47 ` [Linux-stm32] " Ahmad Fatoum
  2020-11-06 13:06 ` Guenter Roeck
  0 siblings, 2 replies; 3+ messages in thread
From: Christophe Roullier @ 2020-11-06  9:46 UTC (permalink / raw)
  To: wim, linux, mcoquelin.stm32, alexandre.torgue
  Cc: linux-watchdog, christophe.roullier, linux-kernel, linux-stm32,
	linux-arm-kernel, Etienne Carriere

From: Etienne Carriere <etienne.carriere@st.com>

Do not print an error trace when deferring probe for clock resources.

Signed-off-by: Etienne Carriere <etienne.carriere@st.com>
Signed-off-by: Christophe Roullier <christophe.roullier@st.com>
---
 drivers/watchdog/stm32_iwdg.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/drivers/watchdog/stm32_iwdg.c b/drivers/watchdog/stm32_iwdg.c
index 25188d6bbe15..1b71c205cee0 100644
--- a/drivers/watchdog/stm32_iwdg.c
+++ b/drivers/watchdog/stm32_iwdg.c
@@ -163,7 +163,8 @@ static int stm32_iwdg_clk_init(struct platform_device *pdev,
 
 	wdt->clk_lsi = devm_clk_get(dev, "lsi");
 	if (IS_ERR(wdt->clk_lsi)) {
-		dev_err(dev, "Unable to get lsi clock\n");
+		if (PTR_ERR(wdt->clk_lsi) != -EPROBE_DEFER)
+			dev_err(dev, "Unable to get lsi clock\n");
 		return PTR_ERR(wdt->clk_lsi);
 	}
 
@@ -171,7 +172,8 @@ static int stm32_iwdg_clk_init(struct platform_device *pdev,
 	if (wdt->data->has_pclk) {
 		wdt->clk_pclk = devm_clk_get(dev, "pclk");
 		if (IS_ERR(wdt->clk_pclk)) {
-			dev_err(dev, "Unable to get pclk clock\n");
+			if (PTR_ERR(wdt->clk_pclk) != -EPROBE_DEFER)
+				dev_err(dev, "Unable to get pclk clock\n");
 			return PTR_ERR(wdt->clk_pclk);
 		}
 
-- 
2.17.1


^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2020-11-06 13:06 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-11-06  9:46 [PATCH 1/1] watchdog: stm32_iwdg: don't print an error on probe deferral Christophe Roullier
2020-11-06  9:47 ` [Linux-stm32] " Ahmad Fatoum
2020-11-06 13:06 ` Guenter Roeck

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).