mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 10:41:38 -04:00
USB: ehci-platform: fix companion-device leak
Make sure do drop the reference taken to the companion device during
resume.
Fixes: d4d75128b8 ("usb: host: ehci-platform: fix usb 1.1 device is not connected in system resume")
Cc: stable <[email protected]> # 4.11
Signed-off-by: Johan Hovold <[email protected]>
Acked-by: Yoshihiro Shimoda <[email protected]>
Acked-by: Alan Stern <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
This commit is contained in:
parent
1f873d857b
commit
a7415477a2
1 changed files with 3 additions and 1 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Reference in a new issue