Skip to content

Commit c6f8d6f

Browse files
committed
[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
1 parent 4fa77bf commit c6f8d6f

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

reactos/drivers/ksfilter/ks/device.c

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -782,15 +782,14 @@ KsInitializeDevice(
782782
}
783783
}
784784

785-
/* does the driver pnp notification */
786-
if (Descriptor->Dispatch)
785+
/* does the driver care about the add device */
786+
if (Descriptor->Dispatch && Descriptor->Dispatch->Add)
787787
{
788-
/* does the driver care about the add device */
789788
Status = Descriptor->Dispatch->Add(&Header->KsDevice);
790-
791789
DPRINT("Driver: AddHandler Status %x\n", Status);
792-
Header->KsDevice.Descriptor = Descriptor;
793790
}
791+
792+
Header->KsDevice.Descriptor = Descriptor;
794793
}
795794

796795

0 commit comments

Comments
 (0)