aboutsummaryrefslogtreecommitdiff
path: root/fs/ocfs2
diff options
context:
space:
mode:
authorSachin Kamat <sachin.kamat@linaro.org>2013-04-29 15:06:00 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2013-04-29 15:54:27 -0700
commit7cfa74d1018f871e82da1a36992369df5ddda6fa (patch)
tree94f44f4b4f5e30ba070b0a3aa63fe0778e5f6f2e /fs/ocfs2
parent7f4804d4c8b78ca223cee50e22ddaea9903f0930 (diff)
ocfs2/dlm: remove redundant null pointer check
kfree on a NULL pointer is a no-op. Remove the redundant null pointer check. Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org> Acked-by: Mark Fasheh <mfasheh@suse.de> Cc: Joel Becker <jlbec@evilplan.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'fs/ocfs2')
-rw-r--r--fs/ocfs2/dlm/dlmrecovery.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/fs/ocfs2/dlm/dlmrecovery.c b/fs/ocfs2/dlm/dlmrecovery.c
index eeac97bb3bfa..b3fdd1a323d6 100644
--- a/fs/ocfs2/dlm/dlmrecovery.c
+++ b/fs/ocfs2/dlm/dlmrecovery.c
@@ -1498,10 +1498,8 @@ leave:
dlm_put(dlm);
if (ret < 0) {
- if (buf)
- kfree(buf);
- if (item)
- kfree(item);
+ kfree(buf);
+ kfree(item);
mlog_errno(ret);
}