mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-04 02:02:28 +09:00
media: atomisp: do not free kmalloc memory by vfree
fw_minibuffer[i].buffer is allocated by kmalloc in sh_css_load_blob_info and by vmalloc in setup_binary. So use kvfree to decide which of those allocators to use for freeing. Also remove the useless cast. Link: https://lore.kernel.org/linux-media/20210219101216.28406-1-jslaby@suse.cz Signed-off-by: Jiri Slaby <jslaby@suse.cz> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
This commit is contained in:
committed by
Mauro Carvalho Chehab
parent
184fc42a73
commit
040b86483c
@@ -366,7 +366,7 @@ void sh_css_unload_firmware(void)
|
||||
if (fw_minibuffer[i].name)
|
||||
kfree((void *)fw_minibuffer[i].name);
|
||||
if (fw_minibuffer[i].buffer)
|
||||
vfree((void *)fw_minibuffer[i].buffer);
|
||||
kvfree(fw_minibuffer[i].buffer);
|
||||
}
|
||||
kfree(fw_minibuffer);
|
||||
fw_minibuffer = NULL;
|
||||
|
||||
Reference in New Issue
Block a user