Commit 3cbfe807 authored by Gustavo A. R. Silva's avatar Gustavo A. R. Silva Committed by Herbert Xu

crypto: sa2ul - Fix inconsistent IS_ERR and PTR_ERR

Fix inconsistent IS_ERR and PTR_ERR in sa_dma_init(). The proper pointer
to be passed as argument to PTR_ERR() is dd->dma_tx.

This bug was detected with the help of Coccinelle.

Fixes: 7694b6ca ("crypto: sa2ul - Add crypto driver")
Signed-off-by: default avatarGustavo A. R. Silva <gustavoars@kernel.org>
Signed-off-by: default avatarHerbert Xu <herbert@gondor.apana.org.au>
parent 45645709
...@@ -2259,7 +2259,7 @@ static int sa_dma_init(struct sa_crypto_data *dd) ...@@ -2259,7 +2259,7 @@ static int sa_dma_init(struct sa_crypto_data *dd)
dd->dma_tx = dma_request_chan(dd->dev, "tx"); dd->dma_tx = dma_request_chan(dd->dev, "tx");
if (IS_ERR(dd->dma_tx)) { if (IS_ERR(dd->dma_tx)) {
if (PTR_ERR(dd->dma_rx1) != -EPROBE_DEFER) if (PTR_ERR(dd->dma_tx) != -EPROBE_DEFER)
dev_err(dd->dev, "Unable to request tx DMA channel\n"); dev_err(dd->dev, "Unable to request tx DMA channel\n");
ret = PTR_ERR(dd->dma_tx); ret = PTR_ERR(dd->dma_tx);
goto err_dma_tx; goto err_dma_tx;
......
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