diff mbox

crypto: cesa: fix test in mv_cesa_dev_dma_init()

Message ID 1454690748-13495-1-git-send-email-boris.brezillon@free-electrons.com (mailing list archive)
State Accepted
Delegated to: Herbert Xu
Headers show

Commit Message

Boris BREZILLON Feb. 5, 2016, 4:45 p.m. UTC
We are checking twice if dma->cache_pool is not NULL but are never testing
dma->padding_pool value.

Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com>
---
 drivers/crypto/marvell/cesa.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Herbert Xu Feb. 6, 2016, 7:49 a.m. UTC | #1
On Fri, Feb 05, 2016 at 05:45:48PM +0100, Boris Brezillon wrote:
> We are checking twice if dma->cache_pool is not NULL but are never testing
> dma->padding_pool value.
> 
> Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com>

Applied to crypto.
diff mbox

Patch

diff --git a/drivers/crypto/marvell/cesa.c b/drivers/crypto/marvell/cesa.c
index 0643e33..c0656e7 100644
--- a/drivers/crypto/marvell/cesa.c
+++ b/drivers/crypto/marvell/cesa.c
@@ -306,7 +306,7 @@  static int mv_cesa_dev_dma_init(struct mv_cesa_dev *cesa)
 		return -ENOMEM;
 
 	dma->padding_pool = dmam_pool_create("cesa_padding", dev, 72, 1, 0);
-	if (!dma->cache_pool)
+	if (!dma->padding_pool)
 		return -ENOMEM;
 
 	cesa->dma = dma;