[PATCH v2] usb: gadget: atmel: use calloc() to allocate endpoint list

Marek Vasut marek.vasut at mailbox.org
Sat Jun 6 21:12:10 CEST 2026


On 6/6/26 10:27 AM, Zixun LI wrote:
> malloc() doesn't zero out memory, leaving ep->ep.enabled uninitiated,
> which could make this flag falsely true.
> 
> In next usb_ep_enable() call since this flag is true, ep->ops->enable()
> will be skipped. Then usb_ep_queue() will fail on uninitialized endpoint.
> 
> Fixes: 59310d1ecb9f ("usb: gadget: introduce 'enabled' flag in struct usb_ep")
> Signed-off-by: Zixun LI <admin at hifiphile.com>
Reviewed-by: Marek Vasut <marek.vasut+usb at mailbox.org>


More information about the U-Boot mailing list