[PATCH 2/6] usb: xhci-mtk: add missing pm_runtime_dont_use_autosuspend() call

From: Joshua Crofts

Date: Tue Sep 15 2026 - 06:02:23 EST


The disable_pm label in xhci_mtk_probe() and xhci_mtk_remove() both call
pm_runtime_disable() on error or device teardown, but don't call
pm_runtime_dont_use_autosuspend(), causing resource leaks.

Add the missing pm_runtime_dont_use_autosuspend().

Found using Coccinelle.

Fixes: 0cbd4b34cda9 ("xhci: mediatek: support MTK xHCI host controller")
Fixes: 04284eb74e0c ("usb: xhci-mtk: add support runtime PM")
Cc: <stable@xxxxxxxxxxxxxxx>
Signed-off-by: Joshua Crofts <joshua.crofts1@xxxxxxxxx>
---
drivers/usb/host/xhci-mtk.c | 2 ++
1 file changed, 2 insertions(+)

diff --git a/drivers/usb/host/xhci-mtk.c b/drivers/usb/host/xhci-mtk.c
index 60af5fe29bd4..eb483a267bf6 100644
--- a/drivers/usb/host/xhci-mtk.c
+++ b/drivers/usb/host/xhci-mtk.c
@@ -700,6 +700,7 @@ static int xhci_mtk_probe(struct platform_device *pdev)
disable_pm:
pm_runtime_put_noidle(dev);
pm_runtime_disable(dev);
+ pm_runtime_dont_use_autosuspend(dev);
return ret;
}

@@ -731,6 +732,7 @@ static void xhci_mtk_remove(struct platform_device *pdev)
regulator_bulk_disable(BULK_VREGS_NUM, mtk->supplies);

pm_runtime_disable(dev);
+ pm_runtime_dont_use_autosuspend(dev);
pm_runtime_put_noidle(dev);
pm_runtime_set_suspended(dev);
}
--
2.47.3