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>
This commit is contained in:
Gilad Ben-Yossef
2017-12-12 14:53:09 +00:00
committed by Greg Kroah-Hartman
parent 7358733a5c
commit e24673641e

View File

@@ -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);
}
/**