Skip to content

Commit

Permalink
thunderbolt: Check for unplugged router in tb_switch_clx_disable()
Browse files Browse the repository at this point in the history
There is no point disabling CL states if the router is unplugged so in
that case return early.

Signed-off-by: Mika Westerberg <[email protected]>
  • Loading branch information
westeri committed Oct 13, 2023
1 parent 35c9ab4 commit 9e4f5b2
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions drivers/thunderbolt/clx.c
Original file line number Diff line number Diff line change
Expand Up @@ -405,6 +405,9 @@ int tb_switch_clx_disable(struct tb_switch *sw)
if (!clx)
return 0;

if (sw->is_unplugged)
return clx;

up = tb_upstream_port(sw);
down = tb_switch_downstream_port(sw);

Expand Down

0 comments on commit 9e4f5b2

Please sign in to comment.