Skip to contentSkip to conversation

thunderbolt: Do not report errors if on-board retimers are found

PATCH New Utkarsh Patel 1 participant 1 message Dec 20, 2022 Thunderbolt driver

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 thunderbolt: Do not report errors if on-board retimers are found

tb_retimer_scan() returns error even when on-board retimers are found.

Fixes 1e56c88adecc ("thunderbolt: Runtime resume USB4 port when retimers are scanned")
---
 drivers/thunderbolt/retimer.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)
drivers/thunderbolt/retimer.c +2 -3
index 81252e31014a..6ebe7a2886ec 100644
@@ -471,10 +471,9 @@ int tb_retimer_scan(struct tb_port *port, bool add)
 			break;
 	}
 
-	if (!last_idx) {
-		ret = 0;
+	ret = 0;
+	if (!last_idx)
 		goto out;
-	}
 
 	/* Add on-board retimers if they do not exist already */
 	for (i = 1; i <= last_idx; i++) {
Signature · 1 line
2.25.1