Skip to content

Commit 93b400f

Browse files
jhovoldgregkh
authored andcommitted
usb: dwc3: meson-g12a: fix device leaks at unbind
Make sure to drop the references taken to the child devices by of_find_device_by_node() during probe on driver unbind. Fixes: c999933 ("usb: dwc3: Add Amlogic G12A DWC3 glue") Cc: [email protected] # 5.2 Cc: Neil Armstrong <[email protected]> Signed-off-by: Johan Hovold <[email protected]> Reviewed-by: Martin Blumenstingl <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
1 parent 086a0e5 commit 93b400f

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

drivers/usb/dwc3/dwc3-meson-g12a.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -837,6 +837,9 @@ static void dwc3_meson_g12a_remove(struct platform_device *pdev)
837837

838838
usb_role_switch_unregister(priv->role_switch);
839839

840+
put_device(priv->switch_desc.udc);
841+
put_device(priv->switch_desc.usb2_port);
842+
840843
of_platform_depopulate(dev);
841844

842845
for (i = 0 ; i < PHY_COUNT ; ++i) {

0 commit comments

Comments
 (0)