aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/qla2xxx
diff options
context:
space:
mode:
authorChad Dupuis <chad.dupuis@qlogic.com>2011-02-23 18:27:07 -0500
committerJames Bottomley <James.Bottomley@suse.de>2011-02-25 12:24:59 -0500
commit7c8cf2fee1027caaadf0e96145ff97f931ba4bdd (patch)
tree9fb7422358ca3c710a3dcb244a77299dff14478a /drivers/scsi/qla2xxx
parentf5e3e40b398d3593e26fcced987d4bd7b8f9e57a (diff)
[SCSI] qla2xxx: Fix array subscript is above array bounds in qla2xx_build_scsi_type_6_iocbs().
The additional increment of dsd_seg was causing the compiler to throw an array out of bounds warning. This patch moves to a direct assignment of cmd_pkt->fcp_data_dseg_len so that the compiler doesn't generate an array out bounds warning. Signed-off-by: Chad Dupuis <chad.dupuis@qlogic.com> Signed-off-by: Madhuranath Iyengar <Madhu.Iyengar@qlogic.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
Diffstat (limited to 'drivers/scsi/qla2xxx')
-rw-r--r--drivers/scsi/qla2xxx/qla_nx.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/scsi/qla2xxx/qla_nx.c b/drivers/scsi/qla2xxx/qla_nx.c
index fdb96a3584a5..b37445d4ea2f 100644
--- a/drivers/scsi/qla2xxx/qla_nx.c
+++ b/drivers/scsi/qla2xxx/qla_nx.c
@@ -2547,7 +2547,7 @@ qla2xx_build_scsi_type_6_iocbs(srb_t *sp, struct cmd_type_6 *cmd_pkt,
2547 dsd_seg = (uint32_t *)&cmd_pkt->fcp_data_dseg_address; 2547 dsd_seg = (uint32_t *)&cmd_pkt->fcp_data_dseg_address;
2548 *dsd_seg++ = cpu_to_le32(LSD(dsd_ptr->dsd_list_dma)); 2548 *dsd_seg++ = cpu_to_le32(LSD(dsd_ptr->dsd_list_dma));
2549 *dsd_seg++ = cpu_to_le32(MSD(dsd_ptr->dsd_list_dma)); 2549 *dsd_seg++ = cpu_to_le32(MSD(dsd_ptr->dsd_list_dma));
2550 *dsd_seg++ = dsd_list_len; 2550 cmd_pkt->fcp_data_dseg_len = dsd_list_len;
2551 } else { 2551 } else {
2552 *cur_dsd++ = cpu_to_le32(LSD(dsd_ptr->dsd_list_dma)); 2552 *cur_dsd++ = cpu_to_le32(LSD(dsd_ptr->dsd_list_dma));
2553 *cur_dsd++ = cpu_to_le32(MSD(dsd_ptr->dsd_list_dma)); 2553 *cur_dsd++ = cpu_to_le32(MSD(dsd_ptr->dsd_list_dma));