[#5632] Blackfin MUSB might use ep uninitialized

Document created by Aaronwu Employee on Sep 5, 2013
Version 1Show Document
  • View in full screen mode

[#5632] Blackfin MUSB might use ep uninitialized

Submitted By: Mike Frysinger

Open Date

2009-10-20 14:43:04     Close Date

2009-12-04 01:07:30

Priority:

Medium     Assignee:

Cliff Cai

Status:

Closed     Fixed In Release:

N/A

Found In Release:

2009R1-RC6     Release:

Category:

N/A     Board:

N/A

Processor:

BF548     Silicon Revision:

Is this bug repeatable?:

Yes     Resolution:

Fixed

Uboot version or rev.:

    Toolchain version or rev.:

trunk

App binary format:

N/A     

Summary: Blackfin MUSB might use ep uninitialized

Details:

 

when using BF548-EZKIT_defconfig, we get:

drivers/usb/gadget/epautoconf.c: In function ‘usb_ep_autoconfig’:

drivers/usb/gadget/epautoconf.c:237: warning: ‘ep’ may be used uninitialized in this function

drivers/usb/gadget/epautoconf.c: In function ‘usb_ep_autoconfig’:

drivers/usb/gadget/epautoconf.c:237: warning: ‘ep’ may be used uninitialized in this function

drivers/usb/gadget/epautoconf.c: In function ‘usb_ep_autoconfig’:

drivers/usb/gadget/epautoconf.c:237: warning: ‘ep’ may be used uninitialized in this function

drivers/usb/gadget/epautoconf.c: In function ‘usb_ep_autoconfig’:

drivers/usb/gadget/epautoconf.c:237: warning: ‘ep’ may be used uninitialized in this function

drivers/usb/gadget/epautoconf.c: In function ‘usb_ep_autoconfig’:

drivers/usb/gadget/epautoconf.c:237: warning: ‘ep’ may be used uninitialized in this function

 

and indeed the code does:

    } else if (gadget_is_musbhsfc(gadget) || gadget_is_musbhdrc(gadget)) {

        if ((USB_ENDPOINT_XFER_BULK == type)

            || (USB_ENDPOINT_XFER_ISOC == type)) {

            if (USB_DIR_IN & desc->bEndpointAddress)

                ep = find_ep (gadget, "ep5in");

            else

                ep = find_ep (gadget, "ep6out");

        }

        if (ep && ep_matches (gadget, ep, desc))

            return ep;

    }

 

so for non bulk/isoc types, ep is not initialized

 

Follow-ups

 

--- Cliff Cai                                                2009-10-30 06:01:06

it's not a problem of not initializing non bulk/iso eps,just struct usb_ep    *ep

is not initialized.

Anyway,we should add INT ep support.

 

 

 

    Files

    Changes

    Commits

    Dependencies

    Duplicates

    Associations

    Tags

 

File Name     File Type     File Size     Posted By

No Files Were Found

Attachments

    Outcomes