https://git.reactos.org/?p=reactos.git;a=commitdiff;h=46b0f6d9deec116523bf8748a05abecc0ac22672
commit 46b0f6d9deec116523bf8748a05abecc0ac22672 Author: Thomas Faber <thomas.fa...@reactos.org> AuthorDate: Sun Apr 7 11:54:43 2019 +0200 Commit: Thomas Faber <thomas.fa...@reactos.org> CommitDate: Sun Apr 14 15:32:14 2019 +0200 [USBCCGP] Allow unconfiguring the device in USBCCGP_PDOSelectConfiguration. Fixes device removal for USB audio devices. --- drivers/usb/usbccgp/pdo.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/drivers/usb/usbccgp/pdo.c b/drivers/usb/usbccgp/pdo.c index 06a549f315..bcd0acb075 100644 --- a/drivers/usb/usbccgp/pdo.c +++ b/drivers/usb/usbccgp/pdo.c @@ -718,6 +718,14 @@ USBCCGP_PDOSelectConfiguration( return STATUS_SUCCESS; } + // + // if there is no configuration descriptor, unconfigure the device + // + if (Urb->UrbSelectConfiguration.ConfigurationDescriptor == NULL) + { + return STATUS_SUCCESS; + } + // sanity checks //C_ASSERT(sizeof(struct _URB_HEADER) == 16); //C_ASSERT(FIELD_OFFSET(struct _URB_SELECT_CONFIGURATION, Interface.Length) == 24);