Author: aandrejevic
Date: Mon Sep 12 03:59:04 2016
New Revision: 72661
URL:
http://svn.reactos.org/svn/reactos?rev=72661&view=rev
Log:
[KS]
The "Add" routine is optional in the KSDEVICE_DISPATCH structure.
KsDevice.Descriptor should be initialized even if there is no device dispatch.
Modified:
trunk/reactos/drivers/ksfilter/ks/device.c
Modified: trunk/reactos/drivers/ksfilter/ks/device.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/ksfilter/ks/device…
==============================================================================
--- trunk/reactos/drivers/ksfilter/ks/device.c [iso-8859-1] (original)
+++ trunk/reactos/drivers/ksfilter/ks/device.c [iso-8859-1] Mon Sep 12 03:59:04 2016
@@ -782,15 +782,14 @@
}
}
- /* does the driver pnp notification */
- if (Descriptor->Dispatch)
- {
- /* does the driver care about the add device */
+ /* does the driver care about the add device */
+ if (Descriptor->Dispatch && Descriptor->Dispatch->Add)
+ {
Status = Descriptor->Dispatch->Add(&Header->KsDevice);
-
DPRINT("Driver: AddHandler Status %x\n", Status);
- Header->KsDevice.Descriptor = Descriptor;
- }
+ }
+
+ Header->KsDevice.Descriptor = Descriptor;
}