crypto: ccree - replace memset+kfree with kzfree
authorGilad Ben-Yossef <gilad@benyossef.com>
Mon, 19 Feb 2018 14:51:24 +0000 (14:51 +0000)
committerHerbert Xu <herbert@gondor.apana.org.au>
Fri, 2 Mar 2018 16:03:16 +0000 (00:03 +0800)
Replace memset to 0 followed by kfree with kzfree for
simplicity.

Signed-off-by: Gilad Ben-Yossef <gilad@benyossef.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
drivers/crypto/ccree/cc_request_mgr.c

index 2fa06630ead88f867d416d7b79764b0655e2872c..83a8aaae61c724ce1d89ba2c1c9f1abbd32c6317 100644 (file)
@@ -81,8 +81,7 @@ void cc_req_mgr_fini(struct cc_drvdata *drvdata)
        /* Kill tasklet */
        tasklet_kill(&req_mgr_h->comptask);
 #endif
-       memset(req_mgr_h, 0, sizeof(struct cc_req_mgr_handle));
-       kfree(req_mgr_h);
+       kzfree(req_mgr_h);
        drvdata->request_mgr_handle = NULL;
 }