When OHCI reports remote-wakeup capability, a successful wakeup enable
leaves a source attached after driver unbind: usb_remove_hcd() does not
disable controller wakeup.
Disable it after usb_remove_hcd() to balance the enable.
This issue was identified during our ongoing static-analysis research while
reviewing kernel code.
Fixes: 62194244cf87 ("USB: Add Samsung Exynos OHCI diver")
Assisted-by: OpenAI:GPT-5.6
Co-developed-by: Ijae Kim <redacted>
Signed-off-by: Ijae Kim <redacted>
Signed-off-by: Myeonghun Pak <redacted>
---
drivers/usb/host/ohci-exynos.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/usb/host/ohci-exynos.c b/drivers/usb/host/ohci-exynos.c
index cc5cb09..86ff7a0 100644
--- a/drivers/usb/host/ohci-exynos.c
+++ b/drivers/usb/host/ohci-exynos.c
@@ -194,6 +194,7 @@ static void exynos_ohci_remove(struct platform_device *pdev)
pdev->dev.of_node = exynos_ohci->of_node;
usb_remove_hcd(hcd);
+ device_wakeup_disable(hcd->self.controller);
exynos_ohci_phy_disable(&pdev->dev);