From c6f8d6fe2c8e0f70a3631e7f568d6766c4064cdf Mon Sep 17 00:00:00 2001 From: Aleksandar Andrejevic Date: Mon, 12 Sep 2016 03:59:04 +0000 Subject: [PATCH] [KS] The "Add" routine is optional in the KSDEVICE_DISPATCH structure. KsDevice.Descriptor should be initialized even if there is no device dispatch. svn path=/trunk/; revision=72661 --- reactos/drivers/ksfilter/ks/device.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/reactos/drivers/ksfilter/ks/device.c b/reactos/drivers/ksfilter/ks/device.c index b9d865f6ace..57efb0f5feb 100644 --- a/reactos/drivers/ksfilter/ks/device.c +++ b/reactos/drivers/ksfilter/ks/device.c @@ -782,15 +782,14 @@ KsInitializeDevice( } } - /* does the driver pnp notification */ - if (Descriptor->Dispatch) + /* does the driver care about the add device */ + if (Descriptor->Dispatch && Descriptor->Dispatch->Add) { - /* does the driver care about the add device */ Status = Descriptor->Dispatch->Add(&Header->KsDevice); - DPRINT("Driver: AddHandler Status %x\n", Status); - Header->KsDevice.Descriptor = Descriptor; } + + Header->KsDevice.Descriptor = Descriptor; }