mirror of
https://github.com/reactos/reactos.git
synced 2024-12-28 10:04:49 +00: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:
parent
89ecf32e0b
commit
0972f71d9a
1 changed files with 6 additions and 0 deletions
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue