https://git.reactos.org/?p=reactos.git;a=commitdiff;h=528fc589c006d39dfdd6bc...
commit 528fc589c006d39dfdd6bc0e2f15de39f8d96466 Author: Thomas Faber thomas.faber@reactos.org AuthorDate: Sun Mar 3 18:24:44 2019 +0100 Commit: Thomas Faber thomas.faber@reactos.org CommitDate: Sun Apr 14 15:32:12 2019 +0200
[USBCCGP] Do not try to unconfigure a device that is not configured.
Fixes handling failed IRP_MN_START_DEVICE. --- drivers/usb/usbccgp/fdo.c | 7 +++++++ 1 file changed, 7 insertions(+)
diff --git a/drivers/usb/usbccgp/fdo.c b/drivers/usb/usbccgp/fdo.c index 7916e8acf3..927d19ef0f 100644 --- a/drivers/usb/usbccgp/fdo.c +++ b/drivers/usb/usbccgp/fdo.c @@ -338,6 +338,13 @@ FDO_CloseConfiguration( FDODeviceExtension = (PFDO_DEVICE_EXTENSION)DeviceObject->DeviceExtension; ASSERT(FDODeviceExtension->Common.IsFDO);
+ /* Nothing to do if we're not configured */ + if (FDODeviceExtension->ConfigurationDescriptor == NULL || + FDODeviceExtension->InterfaceList == NULL) + { + return STATUS_SUCCESS; + } + /* Now allocate the urb */ Urb = USBD_CreateConfigurationRequestEx(FDODeviceExtension->ConfigurationDescriptor, FDODeviceExtension->InterfaceList);