Author: janderwald
Date: Tue Aug 11 10:49:30 2009
New Revision: 42606
URL:
http://svn.reactos.org/svn/reactos?rev=42606&view=rev
Log:
- Remove superflouous checks
- Found by amine48rz
Modified:
trunk/reactos/drivers/wdm/audio/backpln/portcls/adapter.c
Modified: trunk/reactos/drivers/wdm/audio/backpln/portcls/adapter.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/wdm/audio/backpln/…
==============================================================================
--- trunk/reactos/drivers/wdm/audio/backpln/portcls/adapter.c [iso-8859-1] (original)
+++ trunk/reactos/drivers/wdm/audio/backpln/portcls/adapter.c [iso-8859-1] Tue Aug 11
10:49:30 2009
@@ -91,7 +91,7 @@
IN ULONG DeviceExtensionSize)
{
NTSTATUS status = STATUS_UNSUCCESSFUL;
- PDEVICE_OBJECT fdo = NULL;
+ PDEVICE_OBJECT fdo;
PDEVICE_OBJECT PrevDeviceObject;
PPCLASS_DEVICE_EXTENSION portcls_ext = NULL;
@@ -200,27 +200,21 @@
cleanup:
- if (portcls_ext)
- {
-
- 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);
- }
- }
-
- if (fdo)
- {
- /* delete created fdo */
- IoDeleteDevice(fdo);
- }
+ 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);
+ }
+
+ /* delete created fdo */
+ IoDeleteDevice(fdo);
+
return status;
}