From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-lf0-f66.google.com ([209.85.215.66]:33812 "EHLO mail-lf0-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753712AbdEPO0b (ORCPT ); Tue, 16 May 2017 10:26:31 -0400 From: Johan Hovold To: Greg Kroah-Hartman Cc: Alan Stern , linux-usb@vger.kernel.org, Johan Hovold , stable , Yoshihiro Shimoda Subject: [PATCH 1/2] USB: ehci-platform: fix companion-device leak Date: Tue, 16 May 2017 16:26:13 +0200 Message-Id: <20170516142614.15557-1-johan@kernel.org> Sender: stable-owner@vger.kernel.org List-ID: 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 # 4.11 Cc: Yoshihiro Shimoda Signed-off-by: Johan Hovold --- drivers/usb/host/ehci-platform.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/usb/host/ehci-platform.c b/drivers/usb/host/ehci-platform.c index bc7b9be12f54..f1908ea9fbd8 100644 --- a/drivers/usb/host/ehci-platform.c +++ b/drivers/usb/host/ehci-platform.c @@ -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; -- 2.13.0