mirror of
https://github.com/ApfelTeeSaft/reactos.git
synced 2026-09-02 12:23:31 +00:00
Do not create a new device node if we already know the PDO
svn path=/trunk/; revision=27153
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
@@ -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)
|
||||
{
|
||||
|
||||
@@ -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],
|
||||
|
||||
Reference in New Issue
Block a user