diff --git a/block/blk-zoned.c b/block/blk-zoned.c index 05741c6f618be9162cf642faf83cbbc420023fe8..6b442ae96499a7e55384a18376f006ba57088ed6 100644 --- a/block/blk-zoned.c +++ b/block/blk-zoned.c @@ -173,7 +173,7 @@ int blkdev_zone_mgmt(struct block_device *bdev, enum req_opf op, if (!op_is_zone_mgmt(op)) return -EOPNOTSUPP; - if (!nr_sectors || end_sector > capacity) + if (end_sector <= sector || end_sector > capacity) /* Out of range */ return -EINVAL;