From: kbuild test robot <[email protected]>
NULL check before kfree is not needed.
Generated by: scripts/coccinelle/free/ifnullfree.cocci
Fixes: 4f89dfc3f411 ("erofs: update Kconfig and Makefile")
CC: Gao Xiang <[email protected]>
Signed-off-by: kbuild test robot <[email protected]>
Signed-off-by: Julia Lawall <[email protected]>
Signed-off-by: Chao Yu <[email protected]>
---
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
--
Linux-erofs mailing list
[email protected]
https://lists.ozlabs.org/listinfo/linux-erofs