Merge tag 'for-5.7/drivers-2020-03-29' of git://git.kernel.dk/linux-block
[linux-2.6-microblaze.git] / block / blk-zoned.c
index f18f1ee..f87956e 100644 (file)
@@ -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;