From: Sachin Kamat Date: Mon, 29 Apr 2013 22:06:00 +0000 (-0700) Subject: ocfs2/dlm: remove redundant null pointer check X-Git-Url: http://git.cdn.openwrt.org/?a=commitdiff_plain;h=7cfa74d1018f871e82da1a36992369df5ddda6fa;p=openwrt%2Fstaging%2Fblogic.git 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 Acked-by: Mark Fasheh Cc: Joel Becker Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- 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); }