mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] thunderbolt: Do not report errors if on-board retimers are found
@ 2022-12-20 22:30 Utkarsh Patel
  2022-12-21  6:50 ` Greg KH
  0 siblings, 1 reply; 4+ messages in thread
From: Utkarsh Patel @ 2022-12-20 22:30 UTC (permalink / raw)
  To: mika.westerberg, linux-kernel, linux-usb; +Cc: rajmohan.mani, Utkarsh Patel

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

Fixes: 1e56c88adecc ("thunderbolt: Runtime resume USB4 port when retimers are scanned")

Signed-off-by: Utkarsh Patel <utkarsh.h.patel@intel.com>
---
 drivers/thunderbolt/retimer.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/drivers/thunderbolt/retimer.c b/drivers/thunderbolt/retimer.c
index 81252e31014a..6ebe7a2886ec 100644
--- a/drivers/thunderbolt/retimer.c
+++ b/drivers/thunderbolt/retimer.c
@@ -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++) {
-- 
2.25.1


^ permalink raw reply	[flat|nested] 4+ messages in thread
* [PATCH] thunderbolt: Do not report errors if on-board retimers are found
@ 2022-12-20 22:29 Utkarsh Patel
  0 siblings, 0 replies; 4+ messages in thread
From: Utkarsh Patel @ 2022-12-20 22:29 UTC (permalink / raw)
  To: mika.westerberg, linux-kernel, linux-usb; +Cc: rajmohan.mani, Utkarsh Patel

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

Fixes: 1e56c88adecc ("thunderbolt: Runtime resume USB4 port when retimers are scanned")

Signed-off-by: Utkarsh Patel <utkarsh.h.patel@intel.com>
---
 drivers/thunderbolt/retimer.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/drivers/thunderbolt/retimer.c b/drivers/thunderbolt/retimer.c
index 81252e31014a..6ebe7a2886ec 100644
--- a/drivers/thunderbolt/retimer.c
+++ b/drivers/thunderbolt/retimer.c
@@ -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++) {
-- 
2.25.1


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2022-12-22  6:14 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-12-20 22:30 [PATCH] thunderbolt: Do not report errors if on-board retimers are found Utkarsh Patel
2022-12-21  6:50 ` Greg KH
2022-12-22  6:14   ` Patel, Utkarsh H
  -- strict thread matches above, loose matches on Subject: below --
2022-12-20 22:29 Utkarsh Patel

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®