summaryrefslogtreecommitdiffstats
path: root/drivers/crypto/marvell
diff options
context:
space:
mode:
authorzhong jiang <zhongjiang@huawei.com>2019-09-04 05:01:17 +0200
committerHerbert Xu <herbert@gondor.apana.org.au>2019-09-09 15:48:40 +0200
commit18a0bb4aca81839578fef79c9bdef6710ed1c4dc (patch)
treeea99a6b63b4f1f3a7c25b071736c2b8135d54b4a /drivers/crypto/marvell
parentcrypto: caam - dispose of IRQ mapping only after IRQ is freed (diff)
downloadlinux-18a0bb4aca81839578fef79c9bdef6710ed1c4dc.tar.xz
linux-18a0bb4aca81839578fef79c9bdef6710ed1c4dc.zip
crypto: marvell - Use kzfree rather than its implementation
Use kzfree instead of memset() + kfree(). Signed-off-by: zhong jiang <zhongjiang@huawei.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'drivers/crypto/marvell')
-rw-r--r--drivers/crypto/marvell/hash.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/crypto/marvell/hash.c b/drivers/crypto/marvell/hash.c
index 0f0ac851f4eb..a2b35fb0fb89 100644
--- a/drivers/crypto/marvell/hash.c
+++ b/drivers/crypto/marvell/hash.c
@@ -1148,8 +1148,7 @@ static int mv_cesa_ahmac_pad_init(struct ahash_request *req,
}
/* Set the memory region to 0 to avoid any leak. */
- memset(keydup, 0, keylen);
- kfree(keydup);
+ kzfree(keydup);
if (ret)
return ret;