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
This commit is contained in:
Aleksandar Andrejevic 2016-09-12 03:59:04 +00:00
parent 4fa77bfbc3
commit c6f8d6fe2c

View file

@ -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;
}