Skip to contentSkip to conversation

fpga: xilinx-pr-decoupler: Remove clk_get error message for probe defer

PATCH Applied Nava kishore Manne 2 participants 2 messages Jan 10, 2020

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 fpga: xilinx-pr-decoupler: Remove clk_get error message for probe defer

From: Shubhrajyoti Datta <[email protected]>

In probe, the driver checks for devm_clk_get return and print error message in the failing case. However for -EPROBE_DEFER this message is confusing so avoid it.

---
 drivers/fpga/xilinx-pr-decoupler.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/fpga/xilinx-pr-decoupler.c +2 -1
index af9b387c56d3..7d69af230567 100644
@@ -101,7 +101,8 @@ static int xlnx_pr_decoupler_probe(struct platform_device *pdev)
 
 	priv->clk = devm_clk_get(&pdev->dev, "aclk");
 	if (IS_ERR(priv->clk)) {
-		dev_err(&pdev->dev, "input clock not found\n");
+		if (PTR_ERR(priv->clk) != -EPROBE_DEFER)
+			dev_err(&pdev->dev, "input clock not found\n");
 		return PTR_ERR(priv->clk);
 	}
 
Signature · 1 line
2.18.0
maintainer Applied
#1 lore raw
Quoted 29 lines · Nava kishore Manne

From: Shubhrajyoti Datta <[email protected]>

In probe, the driver checks for devm_clk_get return and print error message in the failing case. However for -EPROBE_DEFER this message is confusing so avoid it.

---
 drivers/fpga/xilinx-pr-decoupler.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/fpga/xilinx-pr-decoupler.c +2 -1
index af9b387c56d3..7d69af230567 100644
@@ -101,7 +101,8 @@ static int xlnx_pr_decoupler_probe(struct platform_device *pdev)
 
 	priv->clk = devm_clk_get(&pdev->dev, "aclk");
 	if (IS_ERR(priv->clk)) {
-		dev_err(&pdev->dev, "input clock not found\n");
+		if (PTR_ERR(priv->clk) != -EPROBE_DEFER)
+			dev_err(&pdev->dev, "input clock not found\n");
 		return PTR_ERR(priv->clk);
 	}
 
Signature · 1 line
2.18.0

Applied to for-next,

Thanks