return InvalidConfigDataReturned;\r
\r
/* Get the mouse interface from the configuration descriptor */\r
- if (USB_GetNextDescriptorComp(&ConfigDescriptorSize, &ConfigDescriptorData, NextMouseInterface))\r
+ if (USB_GetNextDescriptorComp(&ConfigDescriptorSize, &ConfigDescriptorData,\r
+ NextMouseInterface) != DESCRIPTOR_SEARCH_COMP_Found)\r
{\r
/* Descriptor not found, error out */\r
return NoHIDInterfaceFound;\r
\r
/* Get the mouse interface's data endpoint descriptor */\r
if (USB_GetNextDescriptorComp(&ConfigDescriptorSize, &ConfigDescriptorData,\r
- NextInterfaceMouseDataEndpoint))\r
+ NextInterfaceMouseDataEndpoint) != DESCRIPTOR_SEARCH_COMP_Found)\r
{\r
/* Descriptor not found, error out */\r
return NoEndpointFound;\r