[PATCH] ocfs2: Fix unneeded null check
From: Ding Xiang
Date: Fri Aug 31 2018 - 04:35:27 EST
null check for kfree is unnecessary, so remove it.
Signed-off-by: Ding Xiang <dingxiang@xxxxxxxxxxxxxxxxxxxx>w
---
fs/ocfs2/aops.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/fs/ocfs2/aops.c b/fs/ocfs2/aops.c
index 302cd7c..da578ad 100644
--- a/fs/ocfs2/aops.c
+++ b/fs/ocfs2/aops.c
@@ -1392,8 +1392,7 @@ static int ocfs2_unwritten_check(struct inode *inode,
unlock:
spin_unlock(&oi->ip_lock);
out:
- if (new)
- kfree(new);
+ kfree(new);
return ret;
}
--
1.9.1