From: Boris BREZILLON Date: Fri, 5 Feb 2016 16:45:48 +0000 (+0100) Subject: crypto: marvell/cesa - fix test in mv_cesa_dev_dma_init() X-Git-Tag: v4.4.14-KARO~1534 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=2827c1d0344b3d8e43b5ac17aa211d141b94302c;p=karo-tx-linux.git crypto: marvell/cesa - fix test in mv_cesa_dev_dma_init() commit 8a3978ad55fb4c0564d285fb2f6cdee2313fce01 upstream. We are checking twice if dma->cache_pool is not NULL but are never testing dma->padding_pool value. Signed-off-by: Boris Brezillon Signed-off-by: Herbert Xu Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/crypto/marvell/cesa.c b/drivers/crypto/marvell/cesa.c index 0643e3366e33..c0656e7f37b5 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;