From: Boris Krasnovskiy Date: Wed, 11 Sep 2019 06:41:54 +0000 (+0200) Subject: USB: host: ohci-at91: resume: balance the clock start call X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=87e8dfa6f7ebdb3e2802a606bda44d26054f92a8;p=linux.git USB: host: ohci-at91: resume: balance the clock start call There is a clock enable counter run away problem in resume ohci_at91. Code enables clock that was never disabled in case of non wakeup interface. That would make clock unstoppable in future. Use proper alternative to start clocks only if they were stopped before. Signed-off-by: Boris Krasnovskiy Signed-off-by: Nicolas Ferre Acked-by: Alan Stern Link: https://lore.kernel.org/r/20190911064154.28633-4-nicolas.ferre@microchip.com Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/usb/host/ohci-at91.c b/drivers/usb/host/ohci-at91.c index 85d67fe42d59b..513e483977439 100644 --- a/drivers/usb/host/ohci-at91.c +++ b/drivers/usb/host/ohci-at91.c @@ -643,8 +643,8 @@ ohci_hcd_at91_drv_resume(struct device *dev) if (ohci_at91->wakeup) disable_irq_wake(hcd->irq); - - at91_start_clock(ohci_at91); + else + at91_start_clock(ohci_at91); ohci_resume(hcd, false);