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 <nichen@iscas.ac.cn> Reviewed-by: Carlos Maiolino <cmaiolino@redhat.com> Reviewed-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Carlos Maiolino <cem@kernel.org>
1 parent c3a60b6 commit 34ba1fc

1 file changed

Lines changed: 1 addition & 2 deletions

File tree

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)