thunderbolt: Check for unplugged router in tb_switch_clx_disable()

There is no point disabling CL states if the router is unplugged so in
that case return early.

Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com>
This commit is contained in:
Mika Westerberg 2023-09-01 11:32:17 +03:00
parent 35c9ab4fd6
commit 9e4f5b2af2

View File

@ -405,6 +405,9 @@ int tb_switch_clx_disable(struct tb_switch *sw)
if (!clx) if (!clx)
return 0; return 0;
if (sw->is_unplugged)
return clx;
up = tb_upstream_port(sw); up = tb_upstream_port(sw);
down = tb_switch_downstream_port(sw); down = tb_switch_downstream_port(sw);