aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/hptiop.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/scsi/hptiop.c')
-rw-r--r--drivers/scsi/hptiop.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/scsi/hptiop.c b/drivers/scsi/hptiop.c
index 8515054cdf70..0844331abb87 100644
--- a/drivers/scsi/hptiop.c
+++ b/drivers/scsi/hptiop.c
@@ -375,8 +375,9 @@ static void hptiop_host_request_callback(struct hptiop_hba *hba, u32 _tag)
375 scp->result = SAM_STAT_CHECK_CONDITION; 375 scp->result = SAM_STAT_CHECK_CONDITION;
376 memset(&scp->sense_buffer, 376 memset(&scp->sense_buffer,
377 0, sizeof(scp->sense_buffer)); 377 0, sizeof(scp->sense_buffer));
378 memcpy(&scp->sense_buffer, 378 memcpy(&scp->sense_buffer, &req->sg_list,
379 &req->sg_list, le32_to_cpu(req->dataxfer_length)); 379 min(sizeof(scp->sense_buffer),
380 le32_to_cpu(req->dataxfer_length)));
380 break; 381 break;
381 382
382 default: 383 default: