Author: tfaber
Date: Thu Jun 15 13:51:09 2017
New Revision: 75048
URL:
http://svn.reactos.org/svn/reactos?rev=75048&view=rev
Log:
[NTOS:IO]
- Simplify logic in PipCallDriverAddDevice.
CORE-13336
Modified:
trunk/reactos/ntoskrnl/io/pnpmgr/pnpinit.c
Modified: trunk/reactos/ntoskrnl/io/pnpmgr/pnpinit.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/io/pnpmgr/pnpinit…
==============================================================================
--- trunk/reactos/ntoskrnl/io/pnpmgr/pnpinit.c [iso-8859-1] (original)
+++ trunk/reactos/ntoskrnl/io/pnpmgr/pnpinit.c [iso-8859-1] Thu Jun 15 13:51:09 2017
@@ -361,18 +361,21 @@
IopRemoveDevice(DeviceNode);
goto Exit;
}
+
Status = IopInitializeDevice(DeviceNode, DriverObject);
- if (NT_SUCCESS(Status))
- {
- Status = IopAttachFilterDrivers(DeviceNode, SubKey, FALSE);
- if (!NT_SUCCESS(Status))
- {
- IopRemoveDevice(DeviceNode);
- goto Exit;
- }
-
- Status = IopStartDevice(DeviceNode);
- }
+ if (!NT_SUCCESS(Status))
+ {
+ goto Exit;
+ }
+
+ Status = IopAttachFilterDrivers(DeviceNode, SubKey, FALSE);
+ if (!NT_SUCCESS(Status))
+ {
+ IopRemoveDevice(DeviceNode);
+ goto Exit;
+ }
+
+ Status = IopStartDevice(DeviceNode);
Exit:
/* Close key and return status */