sense = kmalloc(SCSI_SENSE_BUFFERSIZE, GFP_KERNEL);
if (!sense)
return DRIVER_ERROR << 24;
- memset(sense, 0, sizeof(*sense));
+ memset(sense, 0, SCSI_SENSE_BUFFERSIZE);
}
result = scsi_execute(sdev, cmd, data_direction, buffer, bufflen,
sense, timeout, retries, 0);
if (sshdr)
- scsi_normalize_sense(sense, sizeof(*sense), sshdr);
+ scsi_normalize_sense(sense, SCSI_SENSE_BUFFERSIZE, sshdr);
kfree(sense);
return result;