]> git-server-git.apps.pok.os.sepia.ceph.com Git - xfsprogs-dev.git/commitdiff
mkfs: remove unnecessary return value affectation
authorDamien Le Moal <dlemoal@kernel.org>
Wed, 28 Jan 2026 04:32:57 +0000 (05:32 +0100)
committerAndrey Albershteyn <aalbersh@kernel.org>
Wed, 28 Jan 2026 09:54:36 +0000 (10:54 +0100)
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>
mkfs/xfs_mkfs.c

index be8e6a9c3392bfd802ac4a0a06095d4717986429..2230e82a2dd8266d0194ce293c31eb672bdf8b6d 100644 (file)
@@ -2586,10 +2586,8 @@ report_zones(
                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;