Commit 59d45f2a authored by zhong jiang's avatar zhong jiang Committed by Greg Kroah-Hartman

staging: exfat: remove the redundant check when kfree an object in exfat_destroy_inode

kfree has taken the null check in account. hence it is unnecessary to add the
null check before kfree the object. Just remove it.
Reported-by: default avatarJulia Lawall <julia.lawall@lip6.fr>
Signed-off-by: default avatarzhong jiang <zhongjiang@huawei.com>
Link: https://lore.kernel.org/r/1567591408-24268-1-git-send-email-zhongjiang@huawei.comSigned-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 7f95bb6a
......@@ -3498,8 +3498,7 @@ static struct inode *exfat_alloc_inode(struct super_block *sb)
static void exfat_destroy_inode(struct inode *inode)
{
if (EXFAT_I(inode)->target)
kfree(EXFAT_I(inode)->target);
kfree(EXFAT_I(inode)->target);
EXFAT_I(inode)->target = NULL;
kmem_cache_free(exfat_inode_cachep, EXFAT_I(inode));
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment