On Fri, Nov 6, 2026 at 8:46 PM Yuho Choi <[email protected]> wrote:

> In host mode, ux500_musb_probe() allocates the struct musb with
> musb_init_controller() and returns the error when musb_lowlevel_init()
> fails, for example when no device is connected. The struct musb is not
> freed on this path, and the driver core then frees the private data that
> holds the only pointer to it. Each 'usb reset', or 'usb start' after
> 'usb stop', probes the controller again and leaks another one.
>
> Free the struct musb when musb_lowlevel_init() fails.
>
> Fixes: 845d9cf61c3a ("usb: musb-new: Add glue driver for ST-Ericsson Ux500")
> Signed-off-by: Yuho Choi <[email protected]>

Reviewed-by: Linus Walleij <[email protected]>

Yours,
Linus Walleij

Reply via email to