Commit c28f3d80 authored by Utkarsh Patel's avatar Utkarsh Patel Committed by Mika Westerberg

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

Currently we return an error even if on-board retimers are found and
that's not expected. Fix this to return an error only if there was one
and 0 otherwise.

Fixes: 1e56c88a ("thunderbolt: Runtime resume USB4 port when retimers are scanned")
Cc: stable@vger.kernel.org
Signed-off-by: default avatarUtkarsh Patel <utkarsh.h.patel@intel.com>
Signed-off-by: default avatarMika Westerberg <mika.westerberg@linux.intel.com>
parent 1b929c02
......@@ -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++) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment