[dm-devel] [PATCH v4 03/11] scsi: sd_zbc: Fix sd_zbc_check_zones() error checks
Christoph Hellwig
hch at lst.de
Wed Oct 17 07:21:59 UTC 2018
> @@ -687,12 +688,8 @@ int sd_zbc_read_zones(struct scsi_disk *sdkp, unsigned char *buf)
> * Check zone size: only devices with a constant zone size (except
> * an eventual last runt zone) that is a power of 2 are supported.
> */
> - zone_blocks = sd_zbc_check_zones(sdkp);
> - ret = -EFBIG;
> - if (zone_blocks != (u32)zone_blocks)
> - goto err;
> - ret = zone_blocks;
> - if (ret < 0)
> + ret = sd_zbc_check_zones(sdkp, &zone_blocks);
> + if (ret != 0)
This coud be simplified to
if (ret)
or just keep the old
if (ret < 0)
which would still work.
Otherwise looks fine:
Reviewed-by: Christoph Hellwig <hch at lst.de>
More information about the dm-devel
mailing list