summaryrefslogtreecommitdiff
path: root/fs/xfs/scrub/bmap.c
diff options
context:
space:
mode:
authorJoseph Qi <joseph.qi@linux.alibaba.com>2020-12-04 13:38:42 -0800
committerDarrick J. Wong <darrick.wong@oracle.com>2020-12-09 09:49:38 -0800
commit2e984badbcc0f1cf284441c566ca4309fe59ac05 (patch)
tree8c6196c52bcabcaa0d34a7623a1bb73618018870 /fs/xfs/scrub/bmap.c
parent7bc1fea9d36c78e783ce7d4ad28ad129ebcce435 (diff)
xfs: remove unneeded return value check for *init_cursor()
Since *init_cursor() can always return a valid cursor, the NULL check in caller is unneeded. So clean them up. This also keeps the behavior consistent with other callers. Signed-off-by: Joseph Qi <joseph.qi@linux.alibaba.com> Reviewed-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Darrick J. Wong <darrick.wong@oracle.com> Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Diffstat (limited to 'fs/xfs/scrub/bmap.c')
-rw-r--r--fs/xfs/scrub/bmap.c5
1 files changed, 0 insertions, 5 deletions
diff --git a/fs/xfs/scrub/bmap.c b/fs/xfs/scrub/bmap.c
index bce4421acdb9..33559c3a4bc3 100644
--- a/fs/xfs/scrub/bmap.c
+++ b/fs/xfs/scrub/bmap.c
@@ -558,10 +558,6 @@ xchk_bmap_check_ag_rmaps(
return error;
cur = xfs_rmapbt_init_cursor(sc->mp, sc->tp, agf, agno);
- if (!cur) {
- error = -ENOMEM;
- goto out_agf;
- }
sbcri.sc = sc;
sbcri.whichfork = whichfork;
@@ -570,7 +566,6 @@ xchk_bmap_check_ag_rmaps(
error = 0;
xfs_btree_del_cursor(cur, error);
-out_agf:
xfs_trans_brelse(sc->tp, agf);
return error;
}