usb: rearrange usb_ep_get()
There is no need to calculate the 'eps' variable in usb_ep_get() if 'ep' is the control endpoint. Instead the calculation should be done after validating the input before returning an entry indexed by the endpoint 'ep'. Signed-off-by: NLiam Merwick <liam.merwick@oracle.com> Reviewed-by: NDarren Kenny <Darren.Kenny@oracle.com> Reviewed-by: NMark Kanda <Mark.Kanda@oracle.com> Reviewed-by: NAmeya More <ameya.more@oracle.com> Message-id: 1549460216-25808-2-git-send-email-liam.merwick@oracle.com Signed-off-by: NGerd Hoffmann <kraxel@redhat.com>
Showing
想要评论请 注册 或 登录