btrfs: remove redundant NULL check
PATCH 1/1 btrfs: remove redundant NULL check
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 <[email protected]>
Signed-off-by Yang Li <[email protected]>
--- fs/btrfs/raid56.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
fs/btrfs/raid56.c +1 -2
@@ -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 ; }
Signature · 1 line
1.8.3.1
Quoted 15 lines · Yang Li
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 <[email protected]>Signed-off-by Yang Li <[email protected]>--- fs/btrfs/raid56.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)fs/btrfs/raid56.c +0
-0
fs/btrfs/raid56.c int btrfs_alloc_stripe_hash_table(struct btrfs_fs_info *info) · line 236
Quoted 6 lines
fs/btrfs/raid56.c +1
-2@@ -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);
Reviewed-by Anand Jain <[email protected]>
Thanks, Anand
Quoted 4 lines
fs/btrfs/raid56.c +0
-0return 0 ; }
Quoted 6 lines · Yang Li
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 <[email protected]>Signed-off-by Yang Li <[email protected]>
Added to misc-next, thanks.