Author: pschweitzer
Date: Thu Jan 7 19:23:55 2016
New Revision: 70531
URL:
http://svn.reactos.org/svn/reactos?rev=70531&view=rev
Log:
[FDC]
Fix FdcPower() stub so that it doesn't leak IRP on shutdown
Dedicated to Thomas.
CORE-10117
Modified:
trunk/reactos/drivers/storage/fdc/fdc/fdc.c
Modified: trunk/reactos/drivers/storage/fdc/fdc/fdc.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/storage/fdc/fdc/fd…
==============================================================================
--- trunk/reactos/drivers/storage/fdc/fdc/fdc.c [iso-8859-1] (original)
+++ trunk/reactos/drivers/storage/fdc/fdc/fdc.c [iso-8859-1] Thu Jan 7 19:23:55 2016
@@ -143,8 +143,34 @@
FdcPower(IN PDEVICE_OBJECT DeviceObject,
IN PIRP Irp)
{
+ PIO_STACK_LOCATION IrpSp;
+ NTSTATUS Status = Irp->IoStatus.Status;
+ PFDO_DEVICE_EXTENSION DeviceExtension = DeviceObject->DeviceExtension;
+
DPRINT("FdcPower()\n");
- return STATUS_UNSUCCESSFUL;
+
+ IrpSp = IoGetCurrentIrpStackLocation(Irp);
+
+ if (DeviceExtension->Common.IsFDO)
+ {
+ PoStartNextPowerIrp(Irp);
+ IoSkipCurrentIrpStackLocation(Irp);
+ return PoCallDriver(DeviceExtension->LowerDevice, Irp);
+ }
+ else
+ {
+ switch (IrpSp->MinorFunction)
+ {
+ case IRP_MN_QUERY_POWER:
+ case IRP_MN_SET_POWER:
+ Status = STATUS_SUCCESS;
+ break;
+ }
+ PoStartNextPowerIrp(Irp);
+ Irp->IoStatus.Status = Status;
+ IoCompleteRequest(Irp, IO_NO_INCREMENT);
+ return Status;
+ }
}