mirror of
https://github.com/reactos/reactos.git
synced 2025-08-04 00:25:41 +00:00
[NTOS:IO]
- Simplify logic in PipCallDriverAddDevice. CORE-13336 svn path=/trunk/; revision=75048
This commit is contained in:
parent
b2405204cd
commit
7b8f448f33
1 changed files with 13 additions and 10 deletions
|
@ -361,19 +361,22 @@ PipCallDriverAddDevice(IN PDEVICE_NODE DeviceNode,
|
|||
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);
|
||||
Status = IopInitializeDevice(DeviceNode, DriverObject);
|
||||
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 */
|
||||
ZwClose(SubKey);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue