diff mbox series

i2c: imx: don't print error message on probe defer

Message ID 20181114172913.18571-1-l.stach@pengutronix.de
State Accepted
Headers show
Series i2c: imx: don't print error message on probe defer | expand

Commit Message

Lucas Stach Nov. 14, 2018, 5:29 p.m. UTC
Probe deferral is a normal operating condition in the probe function,
so don't spam the log with an error in this case.

Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
---
 drivers/i2c/busses/i2c-imx.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

Comments

Uwe Kleine-König Nov. 15, 2018, 7:33 a.m. UTC | #1
On Wed, Nov 14, 2018 at 06:29:13PM +0100, Lucas Stach wrote:
> Probe deferral is a normal operating condition in the probe function,
> so don't spam the log with an error in this case.
> 
> Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
> ---
>  drivers/i2c/busses/i2c-imx.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/i2c/busses/i2c-imx.c b/drivers/i2c/busses/i2c-imx.c
> index c406700789e1..fa9ad53845d9 100644
> --- a/drivers/i2c/busses/i2c-imx.c
> +++ b/drivers/i2c/busses/i2c-imx.c
> @@ -1090,7 +1090,8 @@ static int i2c_imx_probe(struct platform_device *pdev)
>  	/* Get I2C clock */
>  	i2c_imx->clk = devm_clk_get(&pdev->dev, NULL);
>  	if (IS_ERR(i2c_imx->clk)) {
> -		dev_err(&pdev->dev, "can't get I2C clock\n");
> +		if (PTR_ERR(i2c_imx->clk) != -EPROBE_DEFER)
> +			dev_err(&pdev->dev, "can't get I2C clock\n");
>  		return PTR_ERR(i2c_imx->clk);
>  	}

Acked-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>

Thanks
Uwe
Wolfram Sang Nov. 27, 2018, 11:56 a.m. UTC | #2
On Wed, Nov 14, 2018 at 06:29:13PM +0100, Lucas Stach wrote:
> Probe deferral is a normal operating condition in the probe function,
> so don't spam the log with an error in this case.
> 
> Signed-off-by: Lucas Stach <l.stach@pengutronix.de>

Applied to for-next, thanks!
diff mbox series

Patch

diff --git a/drivers/i2c/busses/i2c-imx.c b/drivers/i2c/busses/i2c-imx.c
index c406700789e1..fa9ad53845d9 100644
--- a/drivers/i2c/busses/i2c-imx.c
+++ b/drivers/i2c/busses/i2c-imx.c
@@ -1090,7 +1090,8 @@  static int i2c_imx_probe(struct platform_device *pdev)
 	/* Get I2C clock */
 	i2c_imx->clk = devm_clk_get(&pdev->dev, NULL);
 	if (IS_ERR(i2c_imx->clk)) {
-		dev_err(&pdev->dev, "can't get I2C clock\n");
+		if (PTR_ERR(i2c_imx->clk) != -EPROBE_DEFER)
+			dev_err(&pdev->dev, "can't get I2C clock\n");
 		return PTR_ERR(i2c_imx->clk);
 	}