Commit 3d5b3868 authored by YueHaibing's avatar YueHaibing Committed by Wolfram Sang

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: 5b3a23a3 ("i2c: imx: notify about real errors on dma i2c_imx_dma_request")
Signed-off-by: default avatarYueHaibing <yuehaibing@huawei.com>
Reviewed-by: default avatarOleksij Rempel <o.rempel@pengutronix.de>
Reviewed-by: default avatarUwe Kleine-König <u.kleine-koenig@pengutronix.de>
Acked-by: default avatarEsben Haabendal <esben@haabendal.dk>
Signed-off-by: default avatarWolfram Sang <wsa@the-dreams.de>
parent b33a02aa
......@@ -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;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment