mirror of
https://github.com/qmk/qmk_firmware.git
synced 2026-09-30 13:58:57 +02:00
Fix to previous patch (make CDCHost demo deallocate pipes when an invalid CDC interface is skipped).
Remove the saving of the USB_GetNextDescriptorComp() return value in all host demos, since it went unused anyway; replaced with a simple check against the success error code for clarity.
This commit is contained in:
@@ -69,7 +69,8 @@ uint8_t ProcessConfigurationDescriptor(void)
|
||||
return InvalidConfigDataReturned;
|
||||
|
||||
/* Get the keyboard interface from the configuration descriptor */
|
||||
if (USB_GetNextDescriptorComp(&ConfigDescriptorSize, &ConfigDescriptorData, NextKeyboardInterface))
|
||||
if (USB_GetNextDescriptorComp(&ConfigDescriptorSize, &ConfigDescriptorData,
|
||||
NextKeyboardInterface) != DESCRIPTOR_SEARCH_COMP_Found)
|
||||
{
|
||||
/* Descriptor not found, error out */
|
||||
return NoHIDInterfaceFound;
|
||||
@@ -77,7 +78,7 @@ uint8_t ProcessConfigurationDescriptor(void)
|
||||
|
||||
/* Get the keyboard interface's data endpoint descriptor */
|
||||
if (USB_GetNextDescriptorComp(&ConfigDescriptorSize, &ConfigDescriptorData,
|
||||
NextInterfaceKeyboardDataEndpoint))
|
||||
NextInterfaceKeyboardDataEndpoint) != DESCRIPTOR_SEARCH_COMP_Found)
|
||||
{
|
||||
/* Descriptor not found, error out */
|
||||
return NoEndpointFound;
|
||||
|
||||
Reference in New Issue
Block a user