diff options
Diffstat (limited to 'drivers/scsi/arcmsr')
-rw-r--r-- | drivers/scsi/arcmsr/arcmsr_hba.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/scsi/arcmsr/arcmsr_hba.c b/drivers/scsi/arcmsr/arcmsr_hba.c index d466a2dac1db..d80dba913a75 100644 --- a/drivers/scsi/arcmsr/arcmsr_hba.c +++ b/drivers/scsi/arcmsr/arcmsr_hba.c | |||
@@ -634,9 +634,9 @@ static void arcmsr_report_sense_info(struct CommandControlBlock *ccb) | |||
634 | pcmd->result = DID_OK << 16; | 634 | pcmd->result = DID_OK << 16; |
635 | if (sensebuffer) { | 635 | if (sensebuffer) { |
636 | int sense_data_length = | 636 | int sense_data_length = |
637 | sizeof(struct SENSE_DATA) < sizeof(pcmd->sense_buffer) | 637 | sizeof(struct SENSE_DATA) < SCSI_SENSE_BUFFERSIZE |
638 | ? sizeof(struct SENSE_DATA) : sizeof(pcmd->sense_buffer); | 638 | ? sizeof(struct SENSE_DATA) : SCSI_SENSE_BUFFERSIZE; |
639 | memset(sensebuffer, 0, sizeof(pcmd->sense_buffer)); | 639 | memset(sensebuffer, 0, SCSI_SENSE_BUFFERSIZE); |
640 | memcpy(sensebuffer, ccb->arcmsr_cdb.SenseData, sense_data_length); | 640 | memcpy(sensebuffer, ccb->arcmsr_cdb.SenseData, sense_data_length); |
641 | sensebuffer->ErrorCode = SCSI_SENSE_CURRENT_ERRORS; | 641 | sensebuffer->ErrorCode = SCSI_SENSE_CURRENT_ERRORS; |
642 | sensebuffer->Valid = 1; | 642 | sensebuffer->Valid = 1; |