]> git.baikalelectronics.ru Git - kernel.git/commitdiff
i2c: mxs: suppress probe-deferral error message
authorStefan Wahren <stefan.wahren@i2se.com>
Sat, 7 Jan 2023 12:32:29 +0000 (13:32 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 9 Feb 2023 10:28:12 +0000 (11:28 +0100)
[ Upstream commit 78a4471fa1a76a8bef4919105de67660a89a1e9b ]

During boot of I2SE Duckbill the kernel log contains a
confusing error:

  Failed to request dma

This is caused by i2c-mxs tries to request a not yet available DMA
channel (-EPROBE_DEFER). So suppress this message by using
dev_err_probe().

Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com>
Reviewed-by: Fabio Estevam <festevam@gmail.com>
Signed-off-by: Wolfram Sang <wsa@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/i2c/busses/i2c-mxs.c

index 5af5cffc444ef0cbbff5812f6bb67dace170744d..d113bed7954526e1cb9afff96b8df98be26d1f15 100644 (file)
@@ -826,8 +826,8 @@ static int mxs_i2c_probe(struct platform_device *pdev)
        /* Setup the DMA */
        i2c->dmach = dma_request_chan(dev, "rx-tx");
        if (IS_ERR(i2c->dmach)) {
-               dev_err(dev, "Failed to request dma\n");
-               return PTR_ERR(i2c->dmach);
+               return dev_err_probe(dev, PTR_ERR(i2c->dmach),
+                                    "Failed to request dma\n");
        }
 
        platform_set_drvdata(pdev, i2c);