From: yuchao0@huawei.com (Chao Yu) Date: Fri, 22 Jun 2018 09:57:57 +0800 Subject: [PATCH RESEND 1/2] erofs: fix ifnullfree.cocci warnings Message-ID: <20180622015758.64935-1-yuchao0@huawei.com> From: kbuild test robot NULL check before kfree is not needed. Generated by: scripts/coccinelle/free/ifnullfree.cocci Fixes: 4f89dfc3f411 ("erofs: update Kconfig and Makefile") CC: Gao Xiang Signed-off-by: kbuild test robot Signed-off-by: Julia Lawall Signed-off-by: Chao Yu --- fs/erofs/super.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/fs/erofs/super.c b/fs/erofs/super.c index c46d1c65dcbb..7e725bbd9a0e 100644 --- a/fs/erofs/super.c +++ b/fs/erofs/super.c @@ -61,8 +61,7 @@ static void i_callback(struct rcu_head *head) kfree(inode->i_link); #endif - if (vi->xattr_shared_xattrs != NULL) - kfree(vi->xattr_shared_xattrs); + kfree(vi->xattr_shared_xattrs); kmem_cache_free(erofs_inode_cachep, vi); } -- 2.18.0.rc1