[NTOS:IO]
authorEric Kohl <eric.kohl@reactos.org>
Mon, 13 Mar 2017 21:23:15 +0000 (21:23 +0000)
committerEric Kohl <eric.kohl@reactos.org>
Mon, 13 Mar 2017 21:23:15 +0000 (21:23 +0000)
IopGetDeviceRelations:
- Use captured parameters to probe for write.
- Do not check IopInitiatePnpIrp for STATUS_PENDING.

svn path=/trunk/; revision=74167

reactos/ntoskrnl/io/pnpmgr/plugplay.c

index 2722119..9797017 100644 (file)
@@ -670,9 +670,7 @@ IopGetDeviceRelations(PPLUGPLAY_CONTROL_DEVICE_RELATIONS_DATA RelationsData)
         BufferSize = RelationsData->BufferSize;
         Buffer = RelationsData->Buffer;
 
-        ProbeForWrite(RelationsData->Buffer,
-                      RelationsData->BufferSize,
-                      sizeof(CHAR));
+        ProbeForWrite(Buffer, BufferSize, sizeof(CHAR));
     }
     _SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER)
     {
@@ -723,7 +721,7 @@ IopGetDeviceRelations(PPLUGPLAY_CONTROL_DEVICE_RELATIONS_DATA RelationsData)
                                &IoStatusBlock,
                                IRP_MN_QUERY_DEVICE_RELATIONS,
                                &Stack);
-    if (!NT_SUCCESS(Status) || Status == STATUS_PENDING)
+    if (!NT_SUCCESS(Status))
     {
         DPRINT1("IopInitiatePnpIrp() failed (Status 0x%08lx)\n", Status);
         goto done;