diff options
| author | 2017-12-12 14:53:09 +0000 | |
|---|---|---|
| committer | 2017-12-13 12:39:38 +0100 | |
| commit | e24673641ec65e263f86a0f5fd5147c4b644181c (patch) | |
| tree | 242231105df19ac2dbf4b43728c0c7fd332b74f3 | |
| parent | staging: ccree: fix sram mgr naming convention (diff) | |
staging: ccree: simplify freeing SRAM memory address
The code freeing the SRAM memory address was zeroing the address
on release although there is nothing secret about it. Simplify
the code by simply calling kfree directly.
Signed-off-by: Gilad Ben-Yossef <gilad@benyossef.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
| -rw-r--r-- | drivers/staging/ccree/ssi_sram_mgr.c | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/drivers/staging/ccree/ssi_sram_mgr.c b/drivers/staging/ccree/ssi_sram_mgr.c index b664e9ba2252..f72d64a98e1a 100644 --- a/drivers/staging/ccree/ssi_sram_mgr.c +++ b/drivers/staging/ccree/ssi_sram_mgr.c @@ -32,13 +32,8 @@ struct cc_sram_ctx { */ void cc_sram_mgr_fini(struct cc_drvdata *drvdata) { - struct cc_sram_ctx *smgr_ctx = drvdata->sram_mgr_handle; - /* Free "this" context */ - if (smgr_ctx) { - memset(smgr_ctx, 0, sizeof(struct cc_sram_ctx)); - kfree(smgr_ctx); - } + kfree(drvdata->sram_mgr_handle); } /** |
