On Sun, 1 Sep 2013, Philippe De Swert wrote:

> Since USB_SS_PORT_LS_U0 is 0x0000 the & operation with the port state would
> always be 0. Thus the if would never be true. Moreover USB_PORT_STAT_ENABLE
> is 0x0002 and as such would never equal to 1. What we actually look for is a
> port that is enabled and in U0/link active state.
> 
> Thanks to Alan Stern for suggesting the correct test in this case.
> 
> Found with coverity: CID 744367, CID 145679
> 
> Signed-off-by: Philippe De Swert <[email protected]>

Acked-by: Alan Stern <[email protected]>

--
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

Reply via email to