summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJulia Lawall <Julia.Lawall@lip6.fr>2015-05-01 19:37:54 (GMT)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2015-05-08 07:23:54 (GMT)
commit2522d76ae4061b679ebabea02e2ccf762846a4c0 (patch)
tree93a9da5491b1cb368f7fab0787408baee0e913c0
parentba99a0aff29344797107fc7cca4adc7694c4fd98 (diff)
downloadlinux-2522d76ae4061b679ebabea02e2ccf762846a4c0.tar.xz
staging: lustre: obdclass: llog: remove unneeded null test before free
Kfree can cope with a null argument, so drop null tests. The semantic patch that makes this change is as follows: (http://coccinelle.lip6.fr/) // <smpl> @@ expression ptr; @@ - if (ptr != NULL) kfree(ptr); // </smpl> Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r--drivers/staging/lustre/lustre/obdclass/llog.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/staging/lustre/lustre/obdclass/llog.c b/drivers/staging/lustre/lustre/obdclass/llog.c
index 636df94..4fa52d1 100644
--- a/drivers/staging/lustre/lustre/obdclass/llog.c
+++ b/drivers/staging/lustre/lustre/obdclass/llog.c
@@ -563,8 +563,7 @@ int llog_reverse_process(const struct lu_env *env,
}
out:
- if (buf)
- kfree(buf);
+ kfree(buf);
return rc;
}
EXPORT_SYMBOL(llog_reverse_process);