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>
This commit is contained in:
Chen Ni 2025-03-13 11:28:59 +08:00 committed by Carlos Maiolino
parent c3a60b673a
commit 34ba1fcd74

View File

@ -1212,8 +1212,7 @@ xfs_growfs_rtg(
goto out_error;
}
if (old_rsum_cache)
kvfree(old_rsum_cache);
kvfree(old_rsum_cache);
goto out_rele;
out_error: