crypto: crypto4xx - Call dma_unmap_page when done
authorHerbert Xu <herbert@gondor.apana.org.au>
Mon, 6 Feb 2023 06:01:53 +0000 (14:01 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 10 Mar 2023 08:39:17 +0000 (09:39 +0100)
commit62ff301aa49291301323823fb808dc661697004c
tree36e5d7aa677731cddd4b12f68c945e1f52ac3a59
parent74fe2bf6746e27f37eb9991bffc53ce37c29250e
crypto: crypto4xx - Call dma_unmap_page when done

[ Upstream commit bcdda4301bdc4955d45f7e1ffefb6207967b067e ]

In crypto4xx_cipher_done, we should be unmapping the dst page, not
mapping it.

This was flagged by a sparse warning about the unused addr variable.
While we're at it, also fix a sparse warning regarding the unused
ctx variable in crypto4xx_ahash_done (by actually using it).

Fixes: 049359d65527 ("crypto: amcc - Add crypt4xx driver")
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Tested-by: Christian Lamparter <chunkeey@gmail.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/crypto/amcc/crypto4xx_core.c