summaryrefslogtreecommitdiff
path: root/drivers/thunderbolt/clx.c
diff options
context:
space:
mode:
authorMika Westerberg <mika.westerberg@linux.intel.com>2023-09-01 11:32:17 +0300
committerMika Westerberg <mika.westerberg@linux.intel.com>2023-10-13 08:49:13 +0300
commit9e4f5b2af24297552017dd3d4db2379779701b6f (patch)
tree1b282f3c20890fb0123518e25c1b309f85f8154c /drivers/thunderbolt/clx.c
parent35c9ab4fd636aaa5a652bc5f41bc8f1cb34b93e6 (diff)
downloadlwn-9e4f5b2af24297552017dd3d4db2379779701b6f.tar.gz
lwn-9e4f5b2af24297552017dd3d4db2379779701b6f.zip
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>
Diffstat (limited to 'drivers/thunderbolt/clx.c')
-rw-r--r--drivers/thunderbolt/clx.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/thunderbolt/clx.c b/drivers/thunderbolt/clx.c
index c08b9cf0371e..787dfd1550e5 100644
--- a/drivers/thunderbolt/clx.c
+++ b/drivers/thunderbolt/clx.c
@@ -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);