i2c: imx: don't print error message on probe defer
authorLucas Stach <l.stach@pengutronix.de>
Wed, 14 Nov 2018 17:29:13 +0000 (18:29 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 21 Dec 2019 09:41:11 +0000 (10:41 +0100)
[ Upstream commit fece4978510e43f09c8cd386fee15210e8c68493 ]

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>
Acked-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/i2c/busses/i2c-imx.c

index c4188308cefae5b9befe470d60dd43c5c8f81825..9c1be9378dfdec08784a8e222c2fd062fd3b7e9e 100644 (file)
@@ -1088,7 +1088,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);
        }