media: staging: atomisp: Use kvfree() instead of kfree()/vfree()
authorAmitoj Kaur Chawla <amitoj1606@gmail.com>
Mon, 10 Jul 2017 19:27:28 +0000 (15:27 -0400)
committerMauro Carvalho Chehab <mchehab@s-opensource.com>
Wed, 19 Jul 2017 20:26:57 +0000 (16:26 -0400)
commit05f1d92f2b68386a66086b08fc6257c1c143b7ac
tree5192520da63d134313974da8612a992e152823da
parente19902225473529c8b84579930fe66156cd1f258
media: staging: atomisp: Use kvfree() instead of kfree()/vfree()

Conditionally calling kfree()/vfree() can be replaced by a call to
kvfree() which handles both kmalloced memory and vmalloced memory.
The resulting wrapper function has been replaced with direct calls
to kvfree().

This change was made with the help of the following Coccinelle
semantic patch:
//<smpl>
@@
expression a;
@@
- if(...) { vfree(a); }
- else { kfree(a); }
+ kvfree(a);
// </smpl>

Signed-off-by: Amitoj Kaur Chawla <amitoj1606@gmail.com>
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
drivers/staging/media/atomisp/pci/atomisp2/atomisp_cmd.c
drivers/staging/media/atomisp/pci/atomisp2/atomisp_cmd.h
drivers/staging/media/atomisp/pci/atomisp2/atomisp_compat_css20.c
drivers/staging/media/atomisp/pci/atomisp2/atomisp_internal.h