thunderbolt: Do not report errors if on-board retimers are found
authorUtkarsh Patel <utkarsh.h.patel@intel.com>
Fri, 23 Dec 2022 04:22:46 +0000 (20:22 -0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 24 Jan 2023 06:24:37 +0000 (07:24 +0100)
commit16b4b0f8e5a054426dea04b4253d15602220dc1c
tree24677455246da9c0b21715c5a4b89cb2f5a54144
parent15a2e23fd5856e605c04f9ffee8fe1c631599aa0
thunderbolt: Do not report errors if on-board retimers are found

commit c28f3d80383571d3630df1a0e89500d23e855924 upstream.

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: 1e56c88adecc ("thunderbolt: Runtime resume USB4 port when retimers are scanned")
Cc: stable@vger.kernel.org
Signed-off-by: Utkarsh Patel <utkarsh.h.patel@intel.com>
Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/thunderbolt/retimer.c