diff options
author | Sachin Kamat <sachin.kamat@linaro.org> | 2013-04-29 18:06:00 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2013-04-29 18:54:27 -0400 |
commit | 7cfa74d1018f871e82da1a36992369df5ddda6fa (patch) | |
tree | 94f44f4b4f5e30ba070b0a3aa63fe0778e5f6f2e /fs/ocfs2 | |
parent | 7f4804d4c8b78ca223cee50e22ddaea9903f0930 (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.c | 6 |
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: | |||
1498 | 1498 | ||
1499 | dlm_put(dlm); | 1499 | dlm_put(dlm); |
1500 | if (ret < 0) { | 1500 | if (ret < 0) { |
1501 | if (buf) | 1501 | kfree(buf); |
1502 | kfree(buf); | 1502 | kfree(item); |
1503 | if (item) | ||
1504 | kfree(item); | ||
1505 | mlog_errno(ret); | 1503 | mlog_errno(ret); |
1506 | } | 1504 | } |
1507 | 1505 | ||