The function report_zones() in mkfs/xfs_mkfs.c is a void function. So
there is no need to set the variable ret to -EIO before returning if
fstat() fails.
Fixes: 2e5a737a61d3 ("xfs_mkfs: support creating file system with zoned RT devices")
Signed-off-by: Damien Le Moal <dlemoal@kernel.org>
Reviewed-by: Darrick J. Wong <djwong@kernel.org>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Christoph Hellwig <hch@lst.de>
exit(1);
}
- if (fstat(fd, &st) < 0) {
- ret = -EIO;
+ if (fstat(fd, &st) < 0)
goto out_close;
- }
if (!S_ISBLK(st.st_mode))
goto out_close;