Commit 7cfa74d1 authored by Sachin Kamat's avatar Sachin Kamat Committed by Linus Torvalds

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: default avatarSachin Kamat <sachin.kamat@linaro.org>
Acked-by: default avatarMark Fasheh <mfasheh@suse.de>
Cc: Joel Becker <jlbec@evilplan.org>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent 7f4804d4
......@@ -1498,10 +1498,8 @@ int dlm_mig_lockres_handler(struct o2net_msg *msg, u32 len, void *data,
dlm_put(dlm);
if (ret < 0) {
if (buf)
kfree(buf);
if (item)
kfree(item);
kfree(buf);
kfree(item);
mlog_errno(ret);
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment