ocfs2/dlm: remove redundant null pointer check
authorSachin Kamat <sachin.kamat@linaro.org>
Mon, 29 Apr 2013 22:06:00 +0000 (15:06 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Mon, 29 Apr 2013 22:54:27 +0000 (15:54 -0700)
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>
fs/ocfs2/dlm/dlmrecovery.c

index eeac97bb3bfabd10c84d73b178a50e3ff02ecc1e..b3fdd1a323d6be070f2c85cdd4387fc2eb1547af 100644 (file)
@@ -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);
        }