Commit:     2336a986793c771008b181ec65334c240ce512ca
Parent:     3004e5379a525d848bbe8ddff2c534ac0fb04e2c
Author:     Li Yang <[EMAIL PROTECTED]>
AuthorDate: Thu Jan 3 10:04:40 2008 -0800
Committer:  Greg Kroah-Hartman <[EMAIL PROTECTED]>
CommitDate: Fri Feb 1 14:34:43 2008 -0800

    usb gadget: fix fsl_usb2_udc potential OOPS
    For fsl_usb2_udc driver, ep0 also has a descriptor.  Current code is
    misleading and contains a logical mistake.  Here is the patch to fix it.

    Cc: stable <[EMAIL PROTECTED]>
    Signed-off-by: David Brownell <[EMAIL PROTECTED]>
    Signed-off-by: Greg Kroah-Hartman <[EMAIL PROTECTED]>
 drivers/usb/gadget/fsl_usb2_udc.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/usb/gadget/fsl_usb2_udc.c 
index 038e7d7..d59eb92 100644
--- a/drivers/usb/gadget/fsl_usb2_udc.c
+++ b/drivers/usb/gadget/fsl_usb2_udc.c
@@ -776,7 +776,7 @@ fsl_ep_queue(struct usb_ep *_ep, struct usb_request *_req, 
gfp_t gfp_flags)
                VDBG("%s, bad params\n", __FUNCTION__);
                return -EINVAL;
-       if (!_ep || (!ep->desc && ep_index(ep))) {
+       if (unlikely(!_ep || !ep->desc)) {
                VDBG("%s, bad ep\n", __FUNCTION__);
                return -EINVAL;
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at

Reply via email to