diff mbox series

i2c: mxs: suppress probe-deferral error message

Message ID 20230107123229.4218-1-stefan.wahren@i2se.com (mailing list archive)
State New, archived
Headers show
Series i2c: mxs: suppress probe-deferral error message | expand

Commit Message

Stefan Wahren Jan. 7, 2023, 12:32 p.m. UTC
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>
---
 drivers/i2c/busses/i2c-mxs.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Comments

Fabio Estevam Jan. 7, 2023, 1:10 p.m. UTC | #1
Hi Stefan,

On Sat, Jan 7, 2023 at 9:32 AM Stefan Wahren <stefan.wahren@i2se.com> wrote:
>
> 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>
Wolfram Sang Jan. 9, 2023, 3:27 p.m. UTC | #2
On Sat, Jan 07, 2023 at 01:32:29PM +0100, Stefan Wahren wrote:
> 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>

Applied to for-current, thanks!
diff mbox series

Patch

diff --git a/drivers/i2c/busses/i2c-mxs.c b/drivers/i2c/busses/i2c-mxs.c
index 5af5cffc444e..d113bed79545 100644
--- a/drivers/i2c/busses/i2c-mxs.c
+++ b/drivers/i2c/busses/i2c-mxs.c
@@ -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);