[1/4] i2c: cadence: Fix error printing in case of defer
diff mbox series

Message ID 1575888052-20447-1-git-send-email-shubhrajyoti.datta@gmail.com
State Accepted
Headers show
Series
  • [1/4] i2c: cadence: Fix error printing in case of defer
Related show

Commit Message

Shubhrajyoti Datta Dec. 9, 2019, 10:40 a.m. UTC
From: Shubhrajyoti Datta <shubhrajyoti.datta@xilinx.com>

Do not print error in case of EPROBE_DEFER.

Signed-off-by: Shubhrajyoti Datta <shubhrajyoti.datta@xilinx.com>
---
 drivers/i2c/busses/i2c-cadence.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

Comments

Wolfram Sang Jan. 30, 2020, 8:14 a.m. UTC | #1
On Mon, Dec 09, 2019 at 04:10:49PM +0530, shubhrajyoti.datta@gmail.com wrote:
> From: Shubhrajyoti Datta <shubhrajyoti.datta@xilinx.com>
> 
> Do not print error in case of EPROBE_DEFER.
> 
> Signed-off-by: Shubhrajyoti Datta <shubhrajyoti.datta@xilinx.com>

Applied to for-next, thanks!

Patch
diff mbox series

diff --git a/drivers/i2c/busses/i2c-cadence.c b/drivers/i2c/busses/i2c-cadence.c
index 1ffd21a..7b989a2 100644
--- a/drivers/i2c/busses/i2c-cadence.c
+++ b/drivers/i2c/busses/i2c-cadence.c
@@ -924,7 +924,8 @@  static int cdns_i2c_probe(struct platform_device *pdev)
 
 	id->clk = devm_clk_get(&pdev->dev, NULL);
 	if (IS_ERR(id->clk)) {
-		dev_err(&pdev->dev, "input clock not found.\n");
+		if (PTR_ERR(id->clk) != -EPROBE_DEFER)
+			dev_err(&pdev->dev, "input clock not found.\n");
 		return PTR_ERR(id->clk);
 	}
 	ret = clk_prepare_enable(id->clk);