staging: lustre: lmv: Use !x to check for kzalloc failure
authorJulia Lawall <Julia.Lawall@lip6.fr>
Sat, 20 Jun 2015 16:59:03 +0000 (18:59 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 14 Jul 2015 02:35:52 +0000 (19:35 -0700)
commit76e4290ccc428fddd9052d12ceb5b806ae982a26
treead21340c631681a8c38511e2bd93584c35d918a4
parent94e67761bd05150976342516180508d93a0a7c07
staging: lustre: lmv: Use !x to check for kzalloc failure

!x is more normal for kzalloc failure in the kernel.

The semantic patch that makes this change is as follows:
(http://coccinelle.lip6.fr/)

// <smpl>
@@
expression x;
statement S1, S2;
@@

x = kzalloc(...);
if (
- x == NULL
+ !x
 ) S1 else S2
// </smpl>

Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/lustre/lustre/lmv/lmv_intent.c
drivers/staging/lustre/lustre/lmv/lmv_obd.c