diff options
author | Yang Li <abaci-bugfix@linux.alibaba.com> | 2021-01-21 16:19:47 +0800 |
---|---|---|
committer | David Sterba <dsterba@suse.com> | 2021-02-08 22:58:52 +0100 |
commit | fe3b7bb085a0b1fb26d622a5eccc7dbb5c4f82fb (patch) | |
tree | 9025e18f08e20eda54134066ffa7dc8ee926c749 /fs/btrfs/raid56.c | |
parent | 7e2a870a599d4699a626ec26430c7a1ab14a2a49 (diff) |
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: Abaci Robot <abaci@linux.alibaba.com>
Reviewed-by: Anand Jain <anand.jain@oracle.com>
Signed-off-by: Yang Li <abaci-bugfix@linux.alibaba.com>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'fs/btrfs/raid56.c')
-rw-r--r-- | fs/btrfs/raid56.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/fs/btrfs/raid56.c b/fs/btrfs/raid56.c index 93fbf87bdc8d..5394641541f7 100644 --- a/fs/btrfs/raid56.c +++ b/fs/btrfs/raid56.c @@ -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; } |