Skip to content

USB: lpc32xx: fix error handling

Johan Hovold linux-usb lkml stable 2 versions In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest5 patches 7 repliesIn review
  2. v15 patches 2 repliesSuperseded

Changes in v2 from the cover letter

- defer an ohci error label rename to the clean up patch

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/5usb: gadget: lpc32xx_udc: fix clock imbalance in error pathdrivers/usb/gadget/udc/lpc32xx_udc.c+10 -101 reply
2/5usb: phy: isp1301: fix non-OF device reference imbalancedrivers/usb/phy/phy-isp1301.c+6 -12 replies
3/5usb: ohci-nxp: fix device leak on probe failuredrivers/usb/host/ohci-nxp.c+2 -02 replies
4/5usb: gadget: lpc32xx_udc: clean up probe error labelsdrivers/usb/gadget/udc/lpc32xx_udc.c+10 -111 reply
5/5usb: ohci-nxp: clean up probe error labelsdrivers/usb/host/ohci-nxp.c+8 -81 reply

Reviews trailers per patch

All 5 patches have a Reviewed-by or Acked-by.

PatchAlan SternVladimir Zapolskiy
1/5R-b
2/5R-b
3/5A-b R-b
4/5R-b
5/5R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v2 thread

Cover letter [PATCH v2 0/5] USB: lpc32xx: fix error handling

A recent change fixing a device reference leak introduced a clock imbalance by reusing an error path so that the clock may be disabled before having been enabled.

The very same change could also lead to a use-after-free in case the driver is used with non-OF probing.

This series fixes the resulting mess as well as the related device leak in the NXP OHCI driver.

Included are also two related cleanups.

Johan

Changes in v2:
- defer an ohci error label rename to the clean up patch

Johan Hovold (5):
usb: gadget: lpc32xx_udc: fix clock imbalance in error path
usb: phy: isp1301: fix non-OF device reference imbalance
usb: ohci-nxp: fix device leak on probe failure
usb: gadget: lpc32xx_udc: clean up probe error labels
usb: ohci-nxp: clean up probe error labels

 drivers/usb/gadget/udc/lpc32xx_udc.c | 41 ++++++++++++++--------------
 drivers/usb/host/ohci-nxp.c          | 18 ++++++------
 drivers/usb/phy/phy-isp1301.c        |  7 ++++-
 3 files changed, 36 insertions(+), 30 deletions(-)
Signature · 1 line
2.51.2