Linux USB
 help / color / mirror / Atom feed
* [PATCH 0/3] usb: gadget: fsl_udc: Fix resource management
@ 2026-12-01 13:14 Wanhui Fu
  2026-12-01 13:14 ` [PATCH 1/3] usb: gadget: fsl_udc: Fix incorrect freeing of DMA queue heads Wanhui Fu
                   ` (3 more replies)
  0 siblings, 4 replies; 6+ messages in thread
From: Wanhui Fu @ 2026-12-01 13:14 UTC (permalink / raw)
  To: nkapron, gregkh, johan, u.kleine-koenig, balbi
  Cc: linux-usb, linuxppc-dev, Wanhui Fu

This series reworks resource cleanup during probe and removal in the
Freescale USB2 gadget driver.

The cleanup review also found that an error path in struct_udc_setup()
frees coherent DMA memory with kfree(). Patch 1 handles this separately.

Patch 1 fixes the DMA queue head cleanup in struct_udc_setup().
Patch 2 fixes the gadget lifetime and resource leaks on probe failure.
Patch 3 moves IRQ registration after resource allocation and before the
queue head address is written to the controller.

Compile-test passed.

Wanhui Fu (3):
  usb: gadget: fsl_udc: Fix incorrect freeing of DMA queue heads
  usb: gadget: fsl_udc: Fix gadget lifetime and probe resource leaks
  usb: gadget: fsl_udc: Register IRQ after allocating controller
    resources

 drivers/usb/gadget/udc/fsl_udc_core.c | 99 ++++++++++++++++-----------
 1 file changed, 58 insertions(+), 41 deletions(-)


base-commit: 25faec9ce61c01fb45abf812a222c5b43c3cd5c5
-- 
2.25.1


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

end of thread, other threads:[~2026-12-01 13:26 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-12-01 13:14 [PATCH 0/3] usb: gadget: fsl_udc: Fix resource management Wanhui Fu
2026-12-01 13:14 ` [PATCH 1/3] usb: gadget: fsl_udc: Fix incorrect freeing of DMA queue heads Wanhui Fu
2026-12-01 13:15 ` [PATCH 2/3] usb: gadget: fsl_udc: Fix gadget lifetime and probe resource leaks Wanhui Fu
2026-12-01 13:15 ` [PATCH 3/3] usb: gadget: fsl_udc: Register IRQ after allocating controller resources Wanhui Fu
2026-12-01 13:23   ` sashiko-bot
2026-12-01 13:26 ` [PATCH 0/3] usb: gadget: fsl_udc: Fix resource management sashiko-bot

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