aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/hpsa.c
diff options
context:
space:
mode:
authorStephen M. Cameron <scameron@beardog.cce.hp.com>2011-01-07 11:55:43 -0500
committerJames Bottomley <James.Bottomley@suse.de>2011-01-24 12:33:32 -0500
commitc4f8a299d04bd083643ba93e982ab910219dd1f0 (patch)
tree136ab863eed404c861b8755dec9ec1c91c6621f5 /drivers/scsi/hpsa.c
parent94a136495a3fbe59b960c46fba3574b1159e8489 (diff)
[SCSI] hpsa: fix use of uninitialized variable in hpsa_add_msa2xxx_enclosure_device()
Thanks to Scott Teel for noticing this. Signed-off-by: Stephen M. Cameron <scameron@beardog.cce.hp.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
Diffstat (limited to 'drivers/scsi/hpsa.c')
-rw-r--r--drivers/scsi/hpsa.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/scsi/hpsa.c b/drivers/scsi/hpsa.c
index c255f46e6405..c6c13b0c68eb 100644
--- a/drivers/scsi/hpsa.c
+++ b/drivers/scsi/hpsa.c
@@ -1617,6 +1617,8 @@ static int add_msa2xxx_enclosure_device(struct ctlr_info *h,
1617 if (lun == 0) /* if lun is 0, then obviously we have a lun 0. */ 1617 if (lun == 0) /* if lun is 0, then obviously we have a lun 0. */
1618 return 0; 1618 return 0;
1619 1619
1620 memset(scsi3addr, 0, 8);
1621 scsi3addr[3] = target;
1620 if (is_hba_lunid(scsi3addr)) 1622 if (is_hba_lunid(scsi3addr))
1621 return 0; /* Don't add the RAID controller here. */ 1623 return 0; /* Don't add the RAID controller here. */
1622 1624
@@ -1631,8 +1633,6 @@ static int add_msa2xxx_enclosure_device(struct ctlr_info *h,
1631 return 0; 1633 return 0;
1632 } 1634 }
1633 1635
1634 memset(scsi3addr, 0, 8);
1635 scsi3addr[3] = target;
1636 if (hpsa_update_device_info(h, scsi3addr, this_device)) 1636 if (hpsa_update_device_info(h, scsi3addr, this_device))
1637 return 0; 1637 return 0;
1638 (*nmsa2xxx_enclosures)++; 1638 (*nmsa2xxx_enclosures)++;