These two patches fix some minor issues in the dummy_hcd driver. Both
errors were detected with the help of coverity analysis.
These patches have been updated based on Alan Sterns comments.
For the first patch I have harmonized both occurences of the different
clean-up routine as suggested.
The second patch should now actually have the correct test. Since I did
not find USB_SS_PORT_LINK_STATE defined I checked include/uapi/linux/usb/ch11.h
and figured out that USB_PORT_STAT_LINK_STATE has the right value we look
for to isolate bits 5-8. I left the dum_hcd->rh_state != DUMMY_RH_SUSPENDED
check in, but it might not be needed. I can update that if needed.
Thank you.
Philippe De Swert (2):
usb:gadget:dummy_hcd : Avoid infinite loop
usb:gadget:dummy_hcd : Detect port and link state correctly to avoid
unreachable code
drivers/usb/gadget/dummy_hcd.c | 14 +++++---------
1 file changed, 5 insertions(+), 9 deletions(-)
--
1.8.1.2
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html