* [PATCH] hpsa: fix use of uninitialized variable in hpsa_add_msa2xxx_enclosure_device()
@ 2010-06-11 16:18 Stephen M. Cameron
0 siblings, 0 replies; only message in thread
From: Stephen M. Cameron @ 2010-06-11 16:18 UTC (permalink / raw)
To: linux-scsi; +Cc: James.Bottomley, mikem
From: Stephen M. Cameron <scameron@beardog.cce.hp.com>
hpsa: fix use of uninitialized variable in hpsa_add_msa2xxx_enclosure_device()
Signed-off-by: Stephen M. Cameron <scameron@beardog.cce.hp.com>
---
drivers/scsi/hpsa.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/scsi/hpsa.c b/drivers/scsi/hpsa.c
index 2c75f68..52fe4ee 100644
--- a/drivers/scsi/hpsa.c
+++ b/drivers/scsi/hpsa.c
@@ -1595,6 +1595,8 @@ static int add_msa2xxx_enclosure_device(struct ctlr_info *h,
if (lun == 0) /* if lun is 0, then obviously we have a lun 0. */
return 0;
+ memset(scsi3addr, 0, 8);
+ scsi3addr[3] = target;
if (is_hba_lunid(scsi3addr))
return 0; /* Don't add the RAID controller here. */
@@ -1609,8 +1611,6 @@ static int add_msa2xxx_enclosure_device(struct ctlr_info *h,
return 0;
}
- memset(scsi3addr, 0, 8);
- scsi3addr[3] = target;
if (hpsa_update_device_info(h, scsi3addr, this_device))
return 0;
(*nmsa2xxx_enclosures)++;
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2010-06-11 16:13 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-06-11 16:18 [PATCH] hpsa: fix use of uninitialized variable in hpsa_add_msa2xxx_enclosure_device() Stephen M. Cameron
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox