Staging: lustre: Remove print statement on function failure
authorBhumika Goyal <bhumirks@gmail.com>
Sun, 28 Feb 2016 19:44:33 +0000 (01:14 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 2 Mar 2016 03:38:34 +0000 (19:38 -0800)
commit2f27a3e298e33fa6caa4e1c57ff6773a4bcbf69c
tree2da7817212ef51c75bc530edb0f1e2f65366e3b2
parent04697f7b61b07aedf6fbf2bba73f07b231e44d6a
Staging: lustre: Remove print statement on function failure

The  memory allocation functions generates a call stack containing
all the context information on failure, so print statements can be
removed on failure of these functions. Also remove
unwanted {} around if block after removal of these statements.
Done using coccinelle:

@@
expression e,e1,e2;
identifier x;
@@
e=\(kmalloc\|kmalloc_array\|kzalloc\|
   devm_kzalloc\)(...);
...when!=e=e1
if(!e)
-{
- \(printk\|DBG_8723A\|pr_err\|CERROR\|DBG_88E\)(...);
(
goto x;
|
return e2;
|
return;
)
-}

Signed-off-by: Bhumika Goyal <bhumirks@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/lustre/lustre/libcfs/linux/linux-crypto.c
drivers/staging/lustre/lustre/obdclass/llog.c
drivers/staging/lustre/lustre/obdecho/echo_client.c