From: Bart Van Assche <bart.vanassche@xxxxxxxxxxx> A value is assigned to the variable 'capacity' in sd_zbc_read_zones() but that value is never used. Hence remove the variable 'capacity'. Signed-off-by: Bart Van Assche <bart.vanassche@xxxxxxxxxxx> The variable 'ret' is initialized in sd_zbc_read_zones() but that initialization is not necessary. Signed-off-by: Damien Le Moal <damien.lemoal@xxxxxxx> --- drivers/scsi/sd_zbc.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/scsi/sd_zbc.c b/drivers/scsi/sd_zbc.c index 789c970..cf2c6a7 100644 --- a/drivers/scsi/sd_zbc.c +++ b/drivers/scsi/sd_zbc.c @@ -595,8 +595,7 @@ static int sd_zbc_setup(struct scsi_disk *sdkp) 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)) /* @@ -628,7 +627,6 @@ int sd_zbc_read_zones(struct scsi_disk *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 -- 2.9.3