diff options
Diffstat (limited to 'block/blk-zoned.c')
-rw-r--r-- | block/blk-zoned.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/block/blk-zoned.c b/block/blk-zoned.c index f18f1ee9d71f..f87956e0dcaf 100644 --- a/block/blk-zoned.c +++ b/block/blk-zoned.c @@ -205,7 +205,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; |