lkml.org 
[lkml]   [2017]   [Jul]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH 2/2] staging: media: atomisp2: Replace kfree()/vfree() with kvfree()
From
Date
On Fri, 2017-07-07 at 20:41 -0400, Amitoj Kaur Chawla wrote:
[...]
> --- a/drivers/staging/media/atomisp/pci/atomisp2/atomisp_cmd.c
> +++ b/drivers/staging/media/atomisp/pci/atomisp2/atomisp_cmd.c
> @@ -117,11 +117,7 @@ void *atomisp_kernel_zalloc(size_t bytes, bool
> zero_mem)
>   */
>  void atomisp_kernel_free(void *ptr)
>  {
> - /* Verify if buffer was allocated by vmalloc() or kmalloc()
> */
> - if (is_vmalloc_addr(ptr))
> - vfree(ptr);
> - else
> - kfree(ptr);
> + kvfree(ptr);
>  }
>  
>  /*

Why not get rid of the trivial wrapper function completely?

MfG,
Bernd
--
Bernd Petrovitsch Email : bernd@petrovitsch.priv.at
LUGA : http://www.luga.at

\
 
 \ /
  Last update: 2017-07-08 11:00    [W:0.031 / U:19.168 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site