]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
thunderbolt: Check for unplugged router in tb_switch_clx_disable()
authorMika Westerberg <mika.westerberg@linux.intel.com>
Fri, 1 Sep 2023 08:32:17 +0000 (11:32 +0300)
committerMika Westerberg <mika.westerberg@linux.intel.com>
Fri, 13 Oct 2023 05:49:13 +0000 (08:49 +0300)
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>
drivers/thunderbolt/clx.c

index c08b9cf0371e21ec76f51fc6eae371567c96c4e9..787dfd1550e5da81e325f21d6e9e78d316cb4e04 100644 (file)
@@ -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);