diff --git a/reactos/drivers/hid/hidusb/hidusb.c b/reactos/drivers/hid/hidusb/hidusb.c index 6feaadc1b6f..82b86115ee0 100644 --- a/reactos/drivers/hid/hidusb/hidusb.c +++ b/reactos/drivers/hid/hidusb/hidusb.c @@ -311,6 +311,11 @@ HidCreate( // ASSERT(IoStack->MajorFunction == IRP_MJ_CREATE || IoStack->MajorFunction == IRP_MJ_CLOSE); + // + // informational debug print + // + DPRINT("HIDUSB Request: %x\n", IoStack->MajorFunction); + // // complete request // @@ -318,11 +323,6 @@ HidCreate( Irp->IoStatus.Status = STATUS_SUCCESS; IoCompleteRequest(Irp, IO_NO_INCREMENT); - // - // informal debug print - // - DPRINT("HIDUSB Request: %x\n", IoStack->MajorFunction); - // // done // @@ -714,6 +714,11 @@ HidUsb_GetReportDescriptor( // Irp->IoStatus.Information = Length; + // + // free the report buffer + // + ExFreePoolWithTag(Report, HIDUSB_TAG); + // // done // @@ -909,9 +914,12 @@ HidPower( IN PDEVICE_OBJECT DeviceObject, IN PIRP Irp) { - UNIMPLEMENTED - ASSERT(FALSE); - return STATUS_NOT_IMPLEMENTED; + PHID_DEVICE_EXTENSION DeviceExtension; + + DeviceExtension = DeviceObject->DeviceExtension; + PoStartNextPowerIrp(Irp); + IoSkipCurrentIrpStackLocation(Irp); + return PoCallDriver(DeviceExtension->NextDeviceObject, Irp); } NTSTATUS @@ -928,9 +936,9 @@ HidSystemControl( DeviceExtension = DeviceObject->DeviceExtension; // - // copy stack location + // skip stack location // - IoCopyCurrentIrpStackLocationToNext(Irp); + IoSkipCurrentIrpStackLocation(Irp); // // submit request @@ -1720,15 +1728,6 @@ HidPnp( Status = Irp->IoStatus.Status; } - // - // free resources - // - if (HidDeviceExtension->HidDescriptor) - { - ExFreePoolWithTag(HidDeviceExtension->HidDescriptor, HIDUSB_TAG); - HidDeviceExtension->HidDescriptor = NULL; - } - // // done //