A value is assigned to the variable 'capacity' in sd_zbc_read_zones()
but that value is never used. Hence remove the variable 'capacity'.
[Damien: There is no need to initialize to 0 the variable 'ret'
in sd_zbc_read_zones()]
Signed-off-by: Bart Van Assche <bart.vanassche@sandisk.com>
Signed-off-by: Damien Le Moal <damien.lemoal@wdc.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
 int sd_zbc_read_zones(struct scsi_disk *sdkp,
                      unsigned char *buf)
 {
-       sector_t capacity;
-       int ret = 0;
+       int ret;
 
        if (!sd_is_zoned(sdkp))
                /*
        ret = sd_zbc_check_capacity(sdkp, buf);
        if (ret)
                goto err;
-       capacity = logical_to_sectors(sdkp->device, sdkp->capacity);
 
        /*
         * Check zone size: only devices with a constant zone size (except