Skip to content

Commit 868837b

Browse files
jhovoldgregkh
authored andcommitted
usb: gadget: udc: renesas_usb3: fix device leak at unbind
Make sure to drop the reference to the companion device taken during probe when the driver is unbound. Fixes: 39facfa ("usb: gadget: udc: renesas_usb3: Add register of usb role switch") Cc: [email protected] # 4.19 Cc: Yoshihiro Shimoda <[email protected]> Signed-off-by: Johan Hovold <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
1 parent 93b400f commit 868837b

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

drivers/usb/gadget/udc/renesas_usb3.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2657,6 +2657,7 @@ static void renesas_usb3_remove(struct platform_device *pdev)
26572657
struct renesas_usb3 *usb3 = platform_get_drvdata(pdev);
26582658

26592659
debugfs_remove_recursive(usb3->dentry);
2660+
put_device(usb3->host_dev);
26602661
device_remove_file(&pdev->dev, &dev_attr_role);
26612662

26622663
cancel_work_sync(&usb3->role_work);

0 commit comments

Comments
 (0)