diff --git a/reactos/drivers/bus/acpi/acpienum.c b/reactos/drivers/bus/acpi/acpienum.c index c011dbadd63..48adfd29320 100644 --- a/reactos/drivers/bus/acpi/acpienum.c +++ b/reactos/drivers/bus/acpi/acpienum.c @@ -92,7 +92,7 @@ Bus_PlugInDevice ( L"*%hs", Device->pnp.hardware_id); index++; - temp[index] = UNICODE_NULL; + temp[++index] = UNICODE_NULL; pdoData->HardwareIDs = ExAllocatePool(NonPagedPool, index*sizeof(WCHAR)); diff --git a/reactos/drivers/bus/acpi/buspdo.c b/reactos/drivers/bus/acpi/buspdo.c index aa5ba4254e2..2de25aec10e 100644 --- a/reactos/drivers/bus/acpi/buspdo.c +++ b/reactos/drivers/bus/acpi/buspdo.c @@ -656,6 +656,11 @@ Bus_PDO_QueryResources( ULONG i; ULONGLONG BusNumber; + if (!DeviceData->AcpiHandle) + { + return Irp->IoStatus.Status; + } + /* A bus number resource is not included in the list of current resources * for the root PCI bus so we manually query one here and if we find it * we create a resource list and add a bus number descriptor to it */ @@ -1103,6 +1108,10 @@ Bus_PDO_QueryResourceRequirements( PAGED_CODE (); + if (!DeviceData->AcpiHandle) + { + return Irp->IoStatus.Status; + } /* Get current resources */ while (TRUE)