Skip to contentSkip to conversation

patch "USB: ehci-platform: fix companion-device leak" added to usb-linus

PATCH [email protected] 1 participant 1 message May 17, 2017

Subsystems (3)
lore
Share & tools
lore

[email protected]

author maintainer Applied
#0 lore raw

This is a note to let you know that I've just added the patch titled

USB: ehci-platform: fix companion-device leak

to my usb git tree which can be found at
git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb.git
in the usb-linus branch.

The patch will show up in the next release of the linux-next tree (usually sometime within the next 24 hours during the week.)

The patch will hopefully also be merged in Linus's tree for the next -rc kernel release.

If you have any questions about this process, please let me know.

Quoted 1 line

From a7415477a20448bbb7d13765784c0b29249a176f Mon Sep 17 00:00:00 2001

From: Johan Hovold <[email protected]>
Date: Tue, 16 May 2017 16:26:13 +0200
Subject: USB: ehci-platform: fix companion-device leak

Make sure do drop the reference taken to the companion device during resume.

Fixes d4d75128b8fd ("usb: host: ehci-platform: fix usb 1.1 device is not connected in system resume")
Cc stable <[email protected]> # 4.11
---
 drivers/usb/host/ehci-platform.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
drivers/usb/host/ehci-platform.c +3 -1
index bc7b9be12f54..f1908ea9fbd8 100644
@@ -384,8 +384,10 @@ static int ehci_platform_resume(struct device *dev)
 	}
 
 	companion_dev = usb_of_get_companion_dev(hcd->self.controller);
-	if (companion_dev)
+	if (companion_dev) {
 		device_pm_wait_for_dev(hcd->self.controller, companion_dev);
+		put_device(companion_dev);
+	}
 
 	ehci_resume(hcd, priv->reset_on_resume);
 	return 0;
Signature · 1 line
2.13.0