lkml.org 
[lkml]   [2008]   [Feb]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    Date
    From
    Subject[patch 05/45] usb gadget: fix fsl_usb2_udc potential OOPS

    2.6.24-stable review patch. If anyone has any objections, please let us know.

    ------------------
    From: Li Yang <leoli@freescale.com>

    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

    Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
    Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
    Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

    ---
    drivers/usb/gadget/fsl_usb2_udc.c | 2 +-
    1 file changed, 1 insertion(+), 1 deletion(-)

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


    \
     
     \ /
      Last update: 2008-02-07 21:57    [W:0.019 / U:148.076 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site