Sorry Jon, wrong To: field, this was supposed to be addressed to Mauro
(who is CCed).

On 17. 07. 20, 10:05, Jiri Slaby wrote:
> 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.
> 
> Signed-off-by: Jiri Slaby <jsl...@suse.cz>
> Cc: Mauro Carvalho Chehab <mchehab+hua...@kernel.org>
> ---
>  drivers/staging/media/atomisp/pci/sh_css_firmware.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/staging/media/atomisp/pci/sh_css_firmware.c 
> b/drivers/staging/media/atomisp/pci/sh_css_firmware.c
> index d4ab15b6d1ac..d0011b1d97ed 100644
> --- a/drivers/staging/media/atomisp/pci/sh_css_firmware.c
> +++ b/drivers/staging/media/atomisp/pci/sh_css_firmware.c
> @@ -358,7 +358,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;
> 


-- 
js
suse labs

Reply via email to