diff options
author | Li Yang <leoli@freescale.com> | 2008-01-03 13:04:40 -0500 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2008-02-01 17:34:43 -0500 |
commit | 2336a986793c771008b181ec65334c240ce512ca (patch) | |
tree | d37fb204b34f6425ff4227624575ee07f44e353d /drivers/usb/gadget | |
parent | 3004e5379a525d848bbe8ddff2c534ac0fb04e2c (diff) |
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.
http://bugzilla.kernel.org/show_bug.cgi?id=9595
Cc: stable <stable@kernel.org>
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/usb/gadget')
-rw-r--r-- | 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 b/drivers/usb/gadget/fsl_usb2_udc.c index 038e7d7b4da1..d59eb92a847d 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) | |||
776 | VDBG("%s, bad params\n", __FUNCTION__); | 776 | VDBG("%s, bad params\n", __FUNCTION__); |
777 | return -EINVAL; | 777 | return -EINVAL; |
778 | } | 778 | } |
779 | if (!_ep || (!ep->desc && ep_index(ep))) { | 779 | if (unlikely(!_ep || !ep->desc)) { |
780 | VDBG("%s, bad ep\n", __FUNCTION__); | 780 | VDBG("%s, bad ep\n", __FUNCTION__); |
781 | return -EINVAL; | 781 | return -EINVAL; |
782 | } | 782 | } |