- Hidclass must delete the FDO, not the minidriver.

svn path=/trunk/; revision=59011
This commit is contained in:
Thomas Faber 2013-05-12 18:51:11 +00:00
parent ab06a44464
commit 2f252b01ea
2 changed files with 14 additions and 6 deletions

View file

@ -411,6 +411,13 @@ HidClassFDO_RemoveDevice(
IN PIRP Irp)
{
NTSTATUS Status;
PHIDCLASS_FDO_EXTENSION FDODeviceExtension;
//
// get device extension
//
FDODeviceExtension = DeviceObject->DeviceExtension;
ASSERT(FDODeviceExtension->Common.IsFDO);
/* FIXME cleanup */
@ -425,6 +432,13 @@ HidClassFDO_RemoveDevice(
//
Irp->IoStatus.Status = Status;
IoCompleteRequest(Irp, IO_NO_INCREMENT);
//
// detach and delete device
//
IoDetachDevice(FDODeviceExtension->Common.HidDeviceExtension.NextDeviceObject);
IoDeleteDevice(DeviceObject);
return Status;
}

View file

@ -1660,12 +1660,6 @@ HidPnp(
HidDeviceExtension->ConfigurationDescriptor = NULL;
}
//
// delete and detach device
//
IoDetachDevice(DeviceExtension->NextDeviceObject);
IoDeleteDevice(DeviceObject);
return Status;
}
case IRP_MN_QUERY_PNP_DEVICE_STATE: