crypto: ixp4xx - Fix the size used in a 'dma_free_coherent()' call
authorChristophe JAILLET <christophe.jaillet@wanadoo.fr>
Sun, 2 Aug 2020 14:56:48 +0000 (16:56 +0200)
committerHerbert Xu <herbert@gondor.apana.org.au>
Fri, 21 Aug 2020 04:45:27 +0000 (14:45 +1000)
Update the size used in 'dma_free_coherent()' in order to match the one
used in the corresponding 'dma_alloc_coherent()', in 'setup_crypt_desc()'.

Fixes: 81bef0150074 ("crypto: ixp4xx - Hardware crypto support for IXP4xx CPUs")
Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
drivers/crypto/ixp4xx_crypto.c

index f478bb0..276012e 100644 (file)
@@ -528,7 +528,7 @@ static void release_ixp_crypto(struct device *dev)
 
        if (crypt_virt) {
                dma_free_coherent(dev,
-                       NPE_QLEN_TOTAL * sizeof( struct crypt_ctl),
+                       NPE_QLEN * sizeof(struct crypt_ctl),
                        crypt_virt, crypt_phys);
        }
 }