Skip to content

Commit 3cbfe80

Browse files
GustavoARSilvaherbertx
authored andcommitted
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: 7694b6c ("crypto: sa2ul - Add crypto driver") Signed-off-by: Gustavo A. R. Silva <[email protected]> Signed-off-by: Herbert Xu <[email protected]>
1 parent 4564570 commit 3cbfe80

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/crypto/sa2ul.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2259,7 +2259,7 @@ static int sa_dma_init(struct sa_crypto_data *dd)
22592259

22602260
dd->dma_tx = dma_request_chan(dd->dev, "tx");
22612261
if (IS_ERR(dd->dma_tx)) {
2262-
if (PTR_ERR(dd->dma_rx1) != -EPROBE_DEFER)
2262+
if (PTR_ERR(dd->dma_tx) != -EPROBE_DEFER)
22632263
dev_err(dd->dev, "Unable to request tx DMA channel\n");
22642264
ret = PTR_ERR(dd->dma_tx);
22652265
goto err_dma_tx;

0 commit comments

Comments
 (0)