Skip to content

Commit 34ba1fc

Browse files
Chen Nicmaiolino
authored andcommitted
xfs: remove unnecessary NULL check before kvfree()
Remove unnecessary NULL check before kvfree() reported by Coccinelle/coccicheck and the semantic patch at scripts/coccinelle/free/ifnullfree.cocci. Signed-off-by: Chen Ni <[email protected]> Reviewed-by: Carlos Maiolino <[email protected]> Reviewed-by: Christoph Hellwig <[email protected]> Signed-off-by: Carlos Maiolino <[email protected]>
1 parent c3a60b6 commit 34ba1fc

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

fs/xfs/xfs_rtalloc.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1212,8 +1212,7 @@ xfs_growfs_rtg(
12121212
goto out_error;
12131213
}
12141214

1215-
if (old_rsum_cache)
1216-
kvfree(old_rsum_cache);
1215+
kvfree(old_rsum_cache);
12171216
goto out_rele;
12181217

12191218
out_error:

0 commit comments

Comments
 (0)