mirror of
https://github.com/reactos/reactos.git
synced 2026-05-30 23:33:24 +08:00
[NTOS:PNP] Assert the presence of a device extension when handling PnP root power IRPs
Handling PnP root driver power IRPs requires that a device object must come up with a device extension to determine whether it is a function driver and if so, handle the IRP accordingly. CORE-18989
This commit is contained in:
@@ -1473,6 +1473,12 @@ PnpRootPowerControl(
|
||||
Status = Irp->IoStatus.Status;
|
||||
IrpSp = IoGetCurrentIrpStackLocation(Irp);
|
||||
|
||||
/*
|
||||
* We must handle power IRPs based on whether it is a function driver
|
||||
* or not from the device extension, so it cannot be NULL.
|
||||
*/
|
||||
ASSERT(DeviceExtension);
|
||||
|
||||
if (DeviceExtension->Common.IsFDO)
|
||||
{
|
||||
ASSERT(!DeviceExtension->Common.IsFDO);
|
||||
|
||||
Reference in New Issue
Block a user