summaryrefslogtreecommitdiff
path: root/drivers/i2c
diff options
context:
space:
mode:
authorYueHaibing <yuehaibing@huawei.com>2019-01-17 03:14:54 +0000
committerWolfram Sang <wsa@the-dreams.de>2019-01-22 23:53:03 +0100
commit3d5b38684951564d07e3f4bb482ef9491f49ced1 (patch)
tree19ee10c69e587abba112f30b56080a6aacb2323c /drivers/i2c
parentb33a02aadcc6330a61e511240b634dc11112e65e (diff)
i2c: imx: Fix inconsistent IS_ERR and PTR_ERR in i2c_imx_dma_request()
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> Reviewed-by: Oleksij Rempel <o.rempel@pengutronix.de> Reviewed-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Acked-by: Esben Haabendal <esben@haabendal.dk> Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
Diffstat (limited to 'drivers/i2c')
-rw-r--r--drivers/i2c/busses/i2c-imx.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/i2c/busses/i2c-imx.c b/drivers/i2c/busses/i2c-imx.c
index 09b124547669..42fed40198a0 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;