mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-05-02 05:07:46 -04:00
media: atomisp: spctrl: be sure to zero .code_addr after free
We need that to avoid trying to double-free the driver. Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
This commit is contained in:
@@ -123,8 +123,10 @@ enum ia_css_err ia_css_spctrl_unload_fw(sp_ID_t sp_id)
|
||||
return IA_CSS_ERR_INVALID_ARGUMENTS;
|
||||
|
||||
/* freeup the resource */
|
||||
if (spctrl_cofig_info[sp_id].code_addr)
|
||||
if (spctrl_cofig_info[sp_id].code_addr) {
|
||||
hmm_free(spctrl_cofig_info[sp_id].code_addr);
|
||||
spctrl_cofig_info[sp_id].code_addr = mmgr_NULL;
|
||||
}
|
||||
spctrl_loaded[sp_id] = false;
|
||||
return IA_CSS_SUCCESS;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user