diff --git a/reactos/ntoskrnl/io/iomgr/driver.c b/reactos/ntoskrnl/io/iomgr/driver.c index 3353bcbc7d7..ac1f5aa56b6 100644 --- a/reactos/ntoskrnl/io/iomgr/driver.c +++ b/reactos/ntoskrnl/io/iomgr/driver.c @@ -135,7 +135,7 @@ IopGetDriverObject( if (!NT_SUCCESS(Status)) { - DPRINT1("Failed to reference driver object, status=0x%08x\n", Status); + DPRINT("Failed to reference driver object, status=0x%08x\n", Status); return Status; } diff --git a/reactos/ntoskrnl/io/pnpmgr/plugplay.c b/reactos/ntoskrnl/io/pnpmgr/plugplay.c index 4808f6bb4b9..e3268735ca0 100644 --- a/reactos/ntoskrnl/io/pnpmgr/plugplay.c +++ b/reactos/ntoskrnl/io/pnpmgr/plugplay.c @@ -694,7 +694,7 @@ IopDeviceStatus(PPLUGPLAY_CONTROL_STATUS_DATA StatusData) if (DeviceObject == NULL) return STATUS_NO_SUCH_DEVICE; - DeviceNode = ((PEXTENDED_DEVOBJ_EXTENSION)DeviceObject->DeviceObjectExtension)->DeviceNode; + DeviceNode = IopGetDeviceNode(DeviceObject); switch (Operation) { diff --git a/reactos/ntoskrnl/io/pnpmgr/pnpmgr.c b/reactos/ntoskrnl/io/pnpmgr/pnpmgr.c index 8401a901ab1..b7468d71cda 100644 --- a/reactos/ntoskrnl/io/pnpmgr/pnpmgr.c +++ b/reactos/ntoskrnl/io/pnpmgr/pnpmgr.c @@ -2574,6 +2574,11 @@ IopInvalidateDeviceRelations( */ for (i = 0; i < DeviceRelations->Count; i++) { + if (IopGetDeviceNode(DeviceRelations->Objects[i]) != NULL) + { + ObDereferenceObject(DeviceRelations->Objects[i]); + continue; + } Status = IopCreateDeviceNode( DeviceNode, DeviceRelations->Objects[i],