[PATCH v6 11/11] usb: dwc2: drop redundant ll_hw_enabled checks in suspend/resume
From: Fabrice Gasnier
Date: Wed Nov 25 2026 - 11:33:28 EST
Since commit 2b94b054ac49 ("usb: dwc2: fix hang during suspend if set as
peripheral"), dwc2_suspend() and dwc2_resume() return early when
ll_hw_enabled is false. The later ll_hw_enabled checks in both functions
are therefore always true. Remove them.
No functional change.
Signed-off-by: Fabrice Gasnier <fabrice.gasnier@xxxxxxxxxxx>
---
drivers/usb/dwc2/platform.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/drivers/usb/dwc2/platform.c b/drivers/usb/dwc2/platform.c
index c1f5e03c0d03..733b05191dd7 100644
--- a/drivers/usb/dwc2/platform.c
+++ b/drivers/usb/dwc2/platform.c
@@ -781,8 +781,7 @@ static int __maybe_unused dwc2_suspend(struct device *dev)
if (ret)
return ret;
- if (dwc2->ll_hw_enabled &&
- (is_device_mode || dwc2_host_can_poweroff_phy(dwc2))) {
+ if (is_device_mode || dwc2_host_can_poweroff_phy(dwc2)) {
ret = __dwc2_lowlevel_hw_disable(dwc2);
dwc2->phy_off_for_suspend = true;
}
@@ -818,7 +817,7 @@ static int __maybe_unused dwc2_resume(struct device *dev)
if (!dwc2->ll_hw_enabled)
return 0;
- if (dwc2->phy_off_for_suspend && dwc2->ll_hw_enabled) {
+ if (dwc2->phy_off_for_suspend) {
ret = __dwc2_lowlevel_hw_enable(dwc2);
if (ret)
return ret;
--
2.43.0