mirror of
https://github.com/reactos/reactos.git
synced 2025-05-14 23:03:53 +00:00
- Zero initialize a variable (I have no idea how PREfast missed this important flaw).
- Fix PCI bus enumeration, so that finding SCSI controllers on PCI bus works now. svn path=/trunk/; revision=27445
This commit is contained in:
parent
adb11df303
commit
0d4033d95d
1 changed files with 8 additions and 3 deletions
|
@ -849,6 +849,9 @@ ScsiPortInitialize(IN PVOID Argument1,
|
||||||
/* Zero the internal configuration info structure */
|
/* Zero the internal configuration info structure */
|
||||||
RtlZeroMemory(&ConfigInfo, sizeof(CONFIGURATION_INFO));
|
RtlZeroMemory(&ConfigInfo, sizeof(CONFIGURATION_INFO));
|
||||||
|
|
||||||
|
/* Zero starting slot number */
|
||||||
|
SlotNumber.u.AsULONG = 0;
|
||||||
|
|
||||||
/* Allocate space for access ranges */
|
/* Allocate space for access ranges */
|
||||||
if (HwInitializationData->NumberOfAccessRanges)
|
if (HwInitializationData->NumberOfAccessRanges)
|
||||||
{
|
{
|
||||||
|
@ -1025,7 +1028,7 @@ CreatePortConfig:
|
||||||
HwInitializationData,
|
HwInitializationData,
|
||||||
PortConfig,
|
PortConfig,
|
||||||
RegistryPath,
|
RegistryPath,
|
||||||
BusNumber,
|
ConfigInfo.BusNumber,
|
||||||
&SlotNumber))
|
&SlotNumber))
|
||||||
{
|
{
|
||||||
/* Continue to the next bus, nothing here */
|
/* Continue to the next bus, nothing here */
|
||||||
|
@ -2087,10 +2090,12 @@ SpiGetPciConfigData(IN PDRIVER_OBJECT DriverObject,
|
||||||
&PciConfig,
|
&PciConfig,
|
||||||
sizeof(ULONG));
|
sizeof(ULONG));
|
||||||
|
|
||||||
/* There is nothing there */
|
/* If result of HalGetBusData is 0, then the bus is wrong */
|
||||||
if (DataSize < sizeof(ULONG))
|
if (DataSize == 0)
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
|
||||||
|
/* If result is PCI_INVALID_VENDORID, then this device has no more
|
||||||
|
"Functions" */
|
||||||
if (PciConfig.VendorID == PCI_INVALID_VENDORID)
|
if (PciConfig.VendorID == PCI_INVALID_VENDORID)
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue