projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
94a1364
)
[SCSI] hpsa: fix use of uninitialized variable in hpsa_add_msa2xxx_enclosure_device()
author
Stephen M. Cameron
<
[email protected]
>
Fri, 7 Jan 2011 16:55:43 +0000
(10:55 -0600)
committer
James Bottomley
<
[email protected]
>
Mon, 24 Jan 2011 17:33:32 +0000
(11:33 -0600)
Thanks to Scott Teel for noticing this.
Signed-off-by: Stephen M. Cameron <
[email protected]
>
Signed-off-by: James Bottomley <
[email protected]
>
drivers/scsi/hpsa.c
patch
|
blob
|
history
diff --git
a/drivers/scsi/hpsa.c
b/drivers/scsi/hpsa.c
index c255f46e6405cbfb56b8c750524d22296be111d7..c6c13b0c68eb45f2b82edc3cda073d2219301165 100644
(file)
--- a/
drivers/scsi/hpsa.c
+++ b/
drivers/scsi/hpsa.c
@@
-1617,6
+1617,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. */
@@
-1631,8
+1633,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)++;