[PATCH] xfs: Remove redundant NULL check after __GFP_NOFAIL
From: hongao
Date: Mon Mar 02 2026 - 22:36:28 EST
Remove redundant NULL check after kzalloc() with GFP_KERNEL | __GFP_NOLOCKDEP | __GFP_NOFAIL.
Signed-off-by: hongao <hongao@xxxxxxxxxxxxx>
diff --git a/fs/xfs/libxfs/xfs_da_btree.c b/fs/xfs/libxfs/xfs_da_btree.c
index 766631f0562e..f76dfc8f4e1a 100644
--- a/fs/xfs/libxfs/xfs_da_btree.c
+++ b/fs/xfs/libxfs/xfs_da_btree.c
@@ -2718,10 +2718,6 @@ xfs_dabuf_map(
if (nirecs > 1) {
map = kzalloc(nirecs * sizeof(struct xfs_buf_map),
GFP_KERNEL | __GFP_NOLOCKDEP | __GFP_NOFAIL);
- if (!map) {
- error = -ENOMEM;
- goto out_free_irecs;
- }
*mapp = map;
}
--
2.51.0