summaryrefslogtreecommitdiffstats
path: root/drivers/staging/lustre/lustre/ldlm/ldlm_pool.c
diff options
context:
space:
mode:
authorJulia Lawall <Julia.Lawall@lip6.fr>2015-06-20 18:59:02 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2015-07-13 19:35:52 -0700
commit94e67761bd05150976342516180508d93a0a7c07 (patch)
tree61bfad989b17e7c828e2c0a23b4dab1a2da0a84a /drivers/staging/lustre/lustre/ldlm/ldlm_pool.c
parentc38ce3548e0c5df27b63f9b591f11a9c34416576 (diff)
downloadop-kernel-dev-94e67761bd05150976342516180508d93a0a7c07.zip
op-kernel-dev-94e67761bd05150976342516180508d93a0a7c07.tar.gz
staging: lustre: ldlm: 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>
Diffstat (limited to 'drivers/staging/lustre/lustre/ldlm/ldlm_pool.c')
-rw-r--r--drivers/staging/lustre/lustre/ldlm/ldlm_pool.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/staging/lustre/lustre/ldlm/ldlm_pool.c b/drivers/staging/lustre/lustre/ldlm/ldlm_pool.c
index 1605b9c..4519d77 100644
--- a/drivers/staging/lustre/lustre/ldlm/ldlm_pool.c
+++ b/drivers/staging/lustre/lustre/ldlm/ldlm_pool.c
@@ -1422,7 +1422,7 @@ static int ldlm_pools_thread_start(void)
return -EALREADY;
ldlm_pools_thread = kzalloc(sizeof(*ldlm_pools_thread), GFP_NOFS);
- if (ldlm_pools_thread == NULL)
+ if (!ldlm_pools_thread)
return -ENOMEM;
init_completion(&ldlm_pools_comp);
OpenPOWER on IntegriCloud