[PATCH v2] usb: gadget: atmel: use calloc() to allocate endpoint list
Mattijs Korpershoek
mkorpershoek at kernel.org
Mon Jun 15 09:15:44 CEST 2026
Hi,
On Sat, 06 Jun 2026 10:27:09 +0200, 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.
>
>
> [...]
Thanks, Applied to https://source.denx.de/u-boot/custodians/u-boot-dfu (u-boot-dfu)
[1/1] usb: gadget: atmel: use calloc() to allocate endpoint list
https://source.denx.de/u-boot/custodians/u-boot-dfu/-/commit/033eb908d0a8ed938bc652f34a2d702a29a8726f
--
Mattijs
More information about the U-Boot
mailing list