summaryrefslogtreecommitdiffstats
path: root/fs/ocfs2/dlm/dlmrecovery.c
diff options
context:
space:
mode:
authorSachin Kamat <sachin.kamat@linaro.org>2013-04-30 00:06:00 +0200
committerLinus Torvalds <torvalds@linux-foundation.org>2013-04-30 00:54:27 +0200
commit7cfa74d1018f871e82da1a36992369df5ddda6fa (patch)
tree94f44f4b4f5e30ba070b0a3aa63fe0778e5f6f2e /fs/ocfs2/dlm/dlmrecovery.c
parentocfs2: fix NULL dereference for moving extents (diff)
downloadlinux-7cfa74d1018f871e82da1a36992369df5ddda6fa.tar.xz
linux-7cfa74d1018f871e82da1a36992369df5ddda6fa.zip
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/dlm/dlmrecovery.c')
-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);
}