mirror of https://gitee.com/openkylin/linux.git
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: 5b3a23a3cc
("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>
This commit is contained in:
parent
b33a02aadc
commit
3d5b386849
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue