aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/thunderbolt
diff options
context:
space:
mode:
authorMika Westerberg <mika.westerberg@linux.intel.com>2020-01-08 15:53:16 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2020-01-08 16:55:42 +0100
commitc7a7ac84afeaf310a0ee477fc114e1e291a37c43 (patch)
tree21c0c29ef699dbb69e9c21a89f837b34c6f863f3 /drivers/thunderbolt
parenttools: usb: usbip: Get rid of driver name printout in README (diff)
downloadlinux-dev-c7a7ac84afeaf310a0ee477fc114e1e291a37c43.tar.xz
linux-dev-c7a7ac84afeaf310a0ee477fc114e1e291a37c43.zip
thunderbolt: Fix xhci check in usb4_switch_setup()
The code tried to check whether xhci variable has ROUTER_CS_6_HCI bit set but since xhci type is bool and it already holds true or false based on that very bit, fix the check to use the variable directly. Reported-by: Dan Carpenter <dan.carpenter@oracle.com> Fixes: b04079837b20 ("thunderbolt: Add initial support for USB4") Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com> Link: https://lore.kernel.org/r/20200108125317.36444-2-mika.westerberg@linux.intel.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/thunderbolt')
-rw-r--r--drivers/thunderbolt/usb4.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/thunderbolt/usb4.c b/drivers/thunderbolt/usb4.c
index dbe7ecce4505..b341fc60c4ba 100644
--- a/drivers/thunderbolt/usb4.c
+++ b/drivers/thunderbolt/usb4.c
@@ -239,7 +239,7 @@ int usb4_switch_setup(struct tb_switch *sw)
* and the parent does not have any USB3 dowstream
* adapters (so we cannot do USB 3.x tunneling).
*/
- if (xhci & ROUTER_CS_6_HCI)
+ if (xhci)
val |= ROUTER_CS_5_HCO;
}