[PATCH 5/6] usb: mtu3: add missing pm_runtime_dont_use_autosuspend() calls

From: Joshua Crofts

Date: Tue Sep 15 2026 - 05:40:28 EST


The comm_init_err label in mtu3_probe() and mtu3_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: df2069acb005 ("usb: Add MediaTek USB3 DRD driver")
Fixes: fa6f59e28c61 ("usb: mtu3: support runtime PM for host mode")
Cc: <stable@xxxxxxxxxxxxxxx>
Signed-off-by: Joshua Crofts <joshua.crofts1@xxxxxxxxx>
---
drivers/usb/mtu3/mtu3_plat.c | 2 ++
1 file changed, 2 insertions(+)

diff --git a/drivers/usb/mtu3/mtu3_plat.c b/drivers/usb/mtu3/mtu3_plat.c
index b4f4c776adb9..ce64c36a98f7 100644
--- a/drivers/usb/mtu3/mtu3_plat.c
+++ b/drivers/usb/mtu3/mtu3_plat.c
@@ -445,6 +445,7 @@ static int mtu3_probe(struct platform_device *pdev)
comm_init_err:
pm_runtime_put_noidle(dev);
pm_runtime_disable(dev);
+ pm_runtime_dont_use_autosuspend(dev);
ssusb_debugfs_remove_root(ssusb);

return ret;
@@ -483,6 +484,7 @@ static void mtu3_remove(struct platform_device *pdev)
ssusb_rscs_exit(ssusb);
ssusb_debugfs_remove_root(ssusb);
pm_runtime_disable(&pdev->dev);
+ pm_runtime_dont_use_autosuspend(&pdev->dev);
pm_runtime_put_noidle(&pdev->dev);
pm_runtime_set_suspended(&pdev->dev);
}
--
2.47.3