U-Boot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/6] usb: musb-new: Free the controller if the host probe fails
@ 2026-11-06 19:45 Yuho Choi
  2026-11-06 19:45 ` [PATCH 1/6] usb: musb-new: ux500: " Yuho Choi
                   ` (6 more replies)
  0 siblings, 7 replies; 16+ messages in thread
From: Yuho Choi @ 2026-11-06 19:45 UTC (permalink / raw)
  To: Marek Vasut
  Cc: Stephan Gerhold, Linus Walleij, Greg Malysa, Vasileios Bimpikas,
	Arturs Artamonovs, linux, Tom Rini, u-boot, Yuho Choi

The MUSB glue drivers below allocate the struct musb with
musb_init_controller() in their host probe and return the error when
musb_lowlevel_init() fails, for example when no device is connected.
None of them frees the struct musb on that path, and the driver core
then frees the private data that holds the only pointer to it, so each
'usb reset', or 'usb start' after 'usb stop', leaks another one. This
series frees it in ux500, sc5xx, pic32, omap2430, ti-musb and da8xx.

The same fix for sunxi and mt85xx was sent as separate patches:
"usb: musb-new: sunxi: Free the controller if the host probe fails"
"usb: musb-new: mt85xx: Free the controller if the host probe fails"

The patches are independent of each other. They are build-tested only,
as noted in each patch, and pic32 is not built at all. None was tested
on hardware.

Yuho Choi (6):
  usb: musb-new: ux500: Free the controller if the host probe fails
  usb: musb-new: sc5xx: Free the controller if the host probe fails
  usb: musb-new: pic32: Free the controller if the host probe fails
  usb: musb-new: omap2430: Free the controller if the host probe fails
  usb: musb-new: ti-musb: Free the controller if the host probe fails
  usb: musb-new: da8xx: Free the controller if the host probe fails

 drivers/usb/musb-new/da8xx.c    | 2 ++
 drivers/usb/musb-new/omap2430.c | 6 +++++-
 drivers/usb/musb-new/pic32.c    | 2 ++
 drivers/usb/musb-new/sc5xx.c    | 2 ++
 drivers/usb/musb-new/ti-musb.c  | 2 ++
 drivers/usb/musb-new/ux500.c    | 6 +++++-
 6 files changed, 18 insertions(+), 2 deletions(-)


base-commit: feb8913982e4462c01fd914271f92254a25dc101
-- 
2.43.0


^ permalink raw reply	[flat|nested] 16+ messages in thread

end of thread, other threads:[~2026-11-09 21:01 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-11-06 19:45 [PATCH 0/6] usb: musb-new: Free the controller if the host probe fails Yuho Choi
2026-11-06 19:45 ` [PATCH 1/6] usb: musb-new: ux500: " Yuho Choi
2026-11-06 21:44   ` Linus Walleij
2026-11-06 19:45 ` [PATCH 2/6] usb: musb-new: sc5xx: " Yuho Choi
2026-11-07 23:18   ` Greg Malysa
2026-11-07 23:46     ` Greg Malysa
2026-11-08  3:20       ` Yuho Choi
2026-11-08  5:39         ` Greg Malysa
2026-11-06 19:45 ` [PATCH 3/6] usb: musb-new: pic32: " Yuho Choi
2026-11-06 19:45 ` [PATCH 4/6] usb: musb-new: omap2430: " Yuho Choi
2026-11-06 19:45 ` [PATCH 5/6] usb: musb-new: ti-musb: " Yuho Choi
2026-11-06 19:45 ` [PATCH 6/6] usb: musb-new: da8xx: " Yuho Choi
2026-11-06 20:56 ` [PATCH 0/6] usb: musb-new: " Tom Rini
2026-11-06 23:19   ` Yuho Choi
2026-11-09 17:29     ` Tom Rini
2026-11-09 20:41       ` Yuho Choi

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox