]> git.proxmox.com Git - mirror_ubuntu-focal-kernel.git/commitdiff
crypto: marvell/cesa - fix test in mv_cesa_dev_dma_init()
authorBoris BREZILLON <boris.brezillon@free-electrons.com>
Fri, 5 Feb 2016 16:45:48 +0000 (17:45 +0100)
committerHerbert Xu <herbert@gondor.apana.org.au>
Sat, 6 Feb 2016 07:23:56 +0000 (15:23 +0800)
We are checking twice if dma->cache_pool is not NULL but are never testing
dma->padding_pool value.

Cc: stable@vger.kernel.org
Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
drivers/crypto/marvell/cesa.c

index 0643e3366e3309de88a03e687a2d5353f5715a22..c0656e7f37b5993672002a8a192dc1c9dcf0c4bd 100644 (file)
@@ -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;