Linux I2C development
 help / color / mirror / Atom feed
* [PATCH -next] i2c: imx: Fix inconsistent IS_ERR and PTR_ERR in i2c_imx_dma_request()
@ 2019-01-17  3:14 YueHaibing
  2019-01-17  5:21 ` Oleksij Rempel
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: YueHaibing @ 2019-01-17  3:14 UTC (permalink / raw)
  To: shawnguo, s.hauer, kernel, fabio.estevam, linux-imx, peda,
	wsa+renesas, u.kleine-koenig, l.stach, eha, linux
  Cc: kernel-janitors, YueHaibing, linux-i2c, linux-arm-kernel

Change the call to PTR_ERR to access the value just tested by IS_ERR.

Fixes: 5b3a23a3cc94 ("i2c: imx: notify about real errors on dma i2c_imx_dma_request")
Signed-off-by: YueHaibing <yuehaibing@huawei.com>
---
 drivers/i2c/busses/i2c-imx.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/i2c/busses/i2c-imx.c b/drivers/i2c/busses/i2c-imx.c
index 09b1245..42fed40 100644
--- a/drivers/i2c/busses/i2c-imx.c
+++ b/drivers/i2c/busses/i2c-imx.c
@@ -287,7 +287,7 @@ static int i2c_imx_dma_request(struct imx_i2c_struct *i2c_imx,
 
 	dma->chan_tx = dma_request_chan(dev, "tx");
 	if (IS_ERR(dma->chan_tx)) {
-		ret = PTR_ERR(dma->chan_rx);
+		ret = PTR_ERR(dma->chan_tx);
 		if (ret != -ENODEV && ret != -EPROBE_DEFER)
 			dev_err(dev, "can't request DMA tx channel (%d)\n", ret);
 		goto fail_al;

^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2019-01-22 22:50 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-01-17  3:14 [PATCH -next] i2c: imx: Fix inconsistent IS_ERR and PTR_ERR in i2c_imx_dma_request() YueHaibing
2019-01-17  5:21 ` Oleksij Rempel
2019-01-17 11:03 ` Peter Rosin
2019-01-22 22:50   ` Wolfram Sang
2019-01-22 22:49 ` Wolfram Sang

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox