mirror of
https://github.com/reactos/reactos.git
synced 2025-01-05 22:12:46 +00:00
- Remove superflouous checks
- Found by amine48rz svn path=/trunk/; revision=42606
This commit is contained in:
parent
11caab78fd
commit
85543388b1
1 changed files with 11 additions and 17 deletions
|
@ -91,7 +91,7 @@ PcAddAdapterDevice(
|
|||
IN ULONG DeviceExtensionSize)
|
||||
{
|
||||
NTSTATUS status = STATUS_UNSUCCESSFUL;
|
||||
PDEVICE_OBJECT fdo = NULL;
|
||||
PDEVICE_OBJECT fdo;
|
||||
PDEVICE_OBJECT PrevDeviceObject;
|
||||
PPCLASS_DEVICE_EXTENSION portcls_ext = NULL;
|
||||
|
||||
|
@ -200,28 +200,22 @@ PcAddAdapterDevice(
|
|||
|
||||
cleanup:
|
||||
|
||||
if (portcls_ext)
|
||||
if (portcls_ext->KsDeviceHeader)
|
||||
{
|
||||
|
||||
if (portcls_ext->KsDeviceHeader)
|
||||
{
|
||||
/* free the device header */
|
||||
KsFreeDeviceHeader(portcls_ext->KsDeviceHeader);
|
||||
}
|
||||
|
||||
if (portcls_ext->CreateItems)
|
||||
{
|
||||
/* free previously allocated create items */
|
||||
FreeItem(portcls_ext->CreateItems, TAG_PORTCLASS);
|
||||
}
|
||||
/* free the device header */
|
||||
KsFreeDeviceHeader(portcls_ext->KsDeviceHeader);
|
||||
}
|
||||
|
||||
if (fdo)
|
||||
if (portcls_ext->CreateItems)
|
||||
{
|
||||
/* delete created fdo */
|
||||
IoDeleteDevice(fdo);
|
||||
/* free previously allocated create items */
|
||||
FreeItem(portcls_ext->CreateItems, TAG_PORTCLASS);
|
||||
}
|
||||
|
||||
/* delete created fdo */
|
||||
IoDeleteDevice(fdo);
|
||||
|
||||
|
||||
return status;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue