X-Git-Url: http://git.linex4red.de/pub/USBasp.git/blobdiff_plain/83e293a6ec98c7faad1b76dd312b31b86cbeecc1..6bda628718f67c04ed43e8328f55bdce5319c504:/Demos/Device/Incomplete/Sideshow/Sideshow.c diff --git a/Demos/Device/Incomplete/Sideshow/Sideshow.c b/Demos/Device/Incomplete/Sideshow/Sideshow.c index 3e9778e29..2972e0cf7 100644 --- a/Demos/Device/Incomplete/Sideshow/Sideshow.c +++ b/Demos/Device/Incomplete/Sideshow/Sideshow.c @@ -122,13 +122,11 @@ void EVENT_USB_Device_UnhandledControlRequest(void) if (USB_ControlRequest.bmRequestType == (REQDIR_DEVICETOHOST | REQTYPE_VENDOR | REQREC_DEVICE)) { void* DescriptorPointer; - uint16_t DescriptorSize; + uint16_t DescriptorSize = USB_GetOSFeatureDescriptor(USB_ControlRequest.wValue, USB_ControlRequest.wIndex, + &DescriptorPointer, &DescriptorSize); - if (!(USB_GetOSFeatureDescriptor(USB_ControlRequest.wValue, USB_ControlRequest.wIndex, - &DescriptorPointer, &DescriptorSize))) - { - return; - } + if (DescriptorSize == NO_DESCRIPTOR) + return; Endpoint_ClearSETUP();