提交 fe3b7bb0 编写于 作者: Y Yang Li 提交者: David Sterba

btrfs: remove redundant NULL check before kvfree

Fix below warnings reported by coccicheck:
./fs/btrfs/raid56.c:237:2-8: WARNING: NULL check before some freeing
functions is not needed.
Reported-by: NAbaci Robot <abaci@linux.alibaba.com>
Reviewed-by: NAnand Jain <anand.jain@oracle.com>
Signed-off-by: NYang Li <abaci-bugfix@linux.alibaba.com>
Reviewed-by: NDavid Sterba <dsterba@suse.com>
Signed-off-by: NDavid Sterba <dsterba@suse.com>
上级 7e2a870a
......@@ -233,8 +233,7 @@ int btrfs_alloc_stripe_hash_table(struct btrfs_fs_info *info)
}
x = cmpxchg(&info->stripe_hash_table, NULL, table);
if (x)
kvfree(x);
kvfree(x);
return 0;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册