mirror of
https://github.com/reactos/reactos.git
synced 2025-08-02 12:55:43 +00:00
Don't crash if PCI AddDevice is called with a NULL Pdo (happens if pci.sys is considered as a legacy driver)
svn path=/trunk/; revision=24146
This commit is contained in:
parent
30f438bb7b
commit
25e2b01535
1 changed files with 2 additions and 0 deletions
|
@ -135,6 +135,8 @@ PciAddDevice(
|
||||||
NTSTATUS Status;
|
NTSTATUS Status;
|
||||||
|
|
||||||
DPRINT("Called\n");
|
DPRINT("Called\n");
|
||||||
|
if (PhysicalDeviceObject == NULL)
|
||||||
|
return STATUS_SUCCESS;
|
||||||
|
|
||||||
Status = IoCreateDevice(DriverObject, sizeof(FDO_DEVICE_EXTENSION),
|
Status = IoCreateDevice(DriverObject, sizeof(FDO_DEVICE_EXTENSION),
|
||||||
NULL, FILE_DEVICE_BUS_EXTENDER, FILE_DEVICE_SECURE_OPEN, TRUE, &Fdo);
|
NULL, FILE_DEVICE_BUS_EXTENDER, FILE_DEVICE_SECURE_OPEN, TRUE, &Fdo);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue