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:
@@ -70,7 +70,8 @@ uint8_t ProcessConfigurationDescriptor(void)
|
||||
return InvalidConfigDataReturned;
|
||||
|
||||
/* Get the Still Image interface from the configuration descriptor */
|
||||
if (USB_GetNextDescriptorComp(&ConfigDescriptorSize, &ConfigDescriptorData, NextStillImageInterface))
|
||||
if (USB_GetNextDescriptorComp(&ConfigDescriptorSize, &ConfigDescriptorData,
|
||||
NextStillImageInterface) != DESCRIPTOR_SEARCH_COMP_Found)
|
||||
{
|
||||
/* Descriptor not found, error out */
|
||||
return NoInterfaceFound;
|
||||
@@ -81,7 +82,7 @@ uint8_t ProcessConfigurationDescriptor(void)
|
||||
{
|
||||
/* Fetch the next endpoint from the current Still Image interface */
|
||||
if (USB_GetNextDescriptorComp(&ConfigDescriptorSize, &ConfigDescriptorData,
|
||||
NextSImageInterfaceDataEndpoint))
|
||||
NextSImageInterfaceDataEndpoint) != DESCRIPTOR_SEARCH_COMP_Found)
|
||||
{
|
||||
/* Descriptor not found, error out */
|
||||
return NoEndpointFound;
|
||||
|
||||
Reference in New Issue
Block a user