diff options
author | Chen Ni <nichen@iscas.ac.cn> | 2025-03-13 11:28:59 +0800 |
---|---|---|
committer | Carlos Maiolino <cem@kernel.org> | 2025-03-18 14:24:13 +0100 |
commit | 34ba1fcd74562b5a954e3fda5a303ab412682340 (patch) | |
tree | a4da782527fd1e11c81cf6ab7a1c3358610da9c7 /fs/xfs/xfs_rtalloc.c | |
parent | c3a60b673a229940ab531dfbe917a91c8ea3cefc (diff) |
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>
Diffstat (limited to 'fs/xfs/xfs_rtalloc.c')
-rw-r--r-- | fs/xfs/xfs_rtalloc.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/fs/xfs/xfs_rtalloc.c b/fs/xfs/xfs_rtalloc.c index 9a99629d7de4..3aa222ea9500 100644 --- a/fs/xfs/xfs_rtalloc.c +++ b/fs/xfs/xfs_rtalloc.c @@ -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: |