Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit a7415477 authored by Johan Hovold's avatar Johan Hovold Committed by Greg Kroah-Hartman
Browse files

USB: ehci-platform: fix companion-device leak



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

Fixes: d4d75128 ("usb: host: ehci-platform: fix usb 1.1 device is not connected in system resume")
Cc: stable <stable@vger.kernel.org>     # 4.11
Signed-off-by: default avatarJohan Hovold <johan@kernel.org>
Acked-by: default avatarYoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
Acked-by: default avatarAlan Stern <stern@rowland.harvard.edu>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 1f873d85
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -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;