mirror of
https://github.com/reactos/reactos.git
synced 2024-12-28 01:55:19 +00:00
[PORTCLS] Handle failure return from QueryPowerChangeState. CORE-16611
This commit is contained in:
parent
5a43c52bbb
commit
e4e86c32e7
1 changed files with 8 additions and 2 deletions
|
@ -267,8 +267,14 @@ PortClsPower(
|
|||
PowerState = IoStack->Parameters.Power.State;
|
||||
Status = DeviceExtension->AdapterPowerManagement->QueryPowerChangeState(PowerState);
|
||||
|
||||
// sanity check
|
||||
PC_ASSERT(Status == STATUS_SUCCESS);
|
||||
if (!NT_SUCCESS(Status))
|
||||
{
|
||||
// fail the IRP if the adapter power manager failed
|
||||
PoStartNextPowerIrp(Irp);
|
||||
Irp->IoStatus.Status = Status;
|
||||
IoCompleteRequest(Irp, IO_NO_INCREMENT);
|
||||
return Status;
|
||||
}
|
||||
}
|
||||
|
||||
// only forward query requests
|
||||
|
|
Loading…
Reference in a new issue