media: atomisp: do not free kmalloc memory by vfree
authorJiri Slaby <jslaby@suse.cz>
Fri, 19 Feb 2021 10:12:16 +0000 (11:12 +0100)
committerMauro Carvalho Chehab <mchehab+huawei@kernel.org>
Tue, 23 Mar 2021 15:47:50 +0000 (16:47 +0100)
commit040b86483c63ef426ce0d6c0cd9f8352d3c2fdad
tree9b5e785d23f65d0aa45e84885a981bc1bfe77025
parent184fc42a73b7420cd86ba478202e69926ec6acfd
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>
drivers/staging/media/atomisp/pci/sh_css_firmware.c