[PATCH v6 1/3] usb: gadget: rcar: Fix gadget registration lifecycle in remove

Michele Bisogno micbis.openwrt at gmail.com
Sun Apr 26 08:14:31 CEST 2026


On Sat, 25 Apr 2026 at 06:00, Marek Vasut <marek.vasut at mailbox.org> wrote:
>
> On 4/24/26 6:03 PM, Michele Bisogno wrote:
> > The driver currently fails to unregister the USB gadget when the
> > device is removed or the driver is unbound. This leads to dangling
> > pointers in the UDC core and potential memory corruption.
> >
> > Add a call to usb_del_gadget_udc() in the remove path to ensure
> > a clean teardown of the gadget interface.
> >
> > Reviewed-by: Marek Vasut <marex at denx.de>
>
> Please do make sure you collect actual RB tags as they were provided,
> without any modifications.

Apologies, I am not even sure where I copied it from. :(


More information about the U-Boot mailing list