summaryrefslogtreecommitdiffstats
path: root/drivers/staging/media/atomisp/pci/atomisp2/css2400
diff options
context:
space:
mode:
authorAishwarya Pant2017-10-17 15:14:47 +0200
committerMauro Carvalho Chehab2017-10-31 11:06:43 +0100
commit309167b966b61c2aef2c268c4a0c25334d6310bd (patch)
tree720666597aa421f9a87776cb005e9dbafa9ba894 /drivers/staging/media/atomisp/pci/atomisp2/css2400
parentmedia: Staging: media: atomisp: pci: Eliminate use of typedefs for struct (diff)
downloadkernel-qcow2-linux-309167b966b61c2aef2c268c4a0c25334d6310bd.tar.gz
kernel-qcow2-linux-309167b966b61c2aef2c268c4a0c25334d6310bd.tar.xz
kernel-qcow2-linux-309167b966b61c2aef2c268c4a0c25334d6310bd.zip
media: staging: atomisp: cleanup out of memory messages
Logging of explicit out of memory messages is redundant since memory allocation failures produce a backtrace. Done with the help of the following cocci script: @@ expression ex, ret; statement s; constant char[] c; constant err; identifier f, l; @@ ex = \(kmalloc\|kmalloc_array\|kzalloc\|kcalloc\|kmem_cache_alloc\|kmem_cache_zalloc\| kmem_cache_alloc_node\|kmalloc_node\|kzalloc_node\|devm_kzalloc\)(...) ... when != ex if ( ( !ex | unlikely(!ex) ) ) - { - f(..., c, ...); ( return ex; | return; | return err; | goto l; ) - } else s Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Diffstat (limited to 'drivers/staging/media/atomisp/pci/atomisp2/css2400')
-rw-r--r--drivers/staging/media/atomisp/pci/atomisp2/css2400/sh_css_param_shading.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/staging/media/atomisp/pci/atomisp2/css2400/sh_css_param_shading.c b/drivers/staging/media/atomisp/pci/atomisp2/css2400/sh_css_param_shading.c
index 48e2e63c2336..e6ebd1b08f0d 100644
--- a/drivers/staging/media/atomisp/pci/atomisp2/css2400/sh_css_param_shading.c
+++ b/drivers/staging/media/atomisp/pci/atomisp2/css2400/sh_css_param_shading.c
@@ -365,10 +365,8 @@ ia_css_shading_table_alloc(
IA_CSS_ENTER("");
me = kmalloc(sizeof(*me), GFP_KERNEL);
- if (!me) {
- IA_CSS_ERROR("out of memory");
+ if (!me)
return me;
- }
me->width = width;
me->height = height;