Commit e2467364 authored by Gilad Ben-Yossef's avatar Gilad Ben-Yossef Committed by Greg Kroah-Hartman

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: default avatarGilad Ben-Yossef <gilad@benyossef.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 7358733a
......@@ -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);
}
/**
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment