Skip to content

Commit

Permalink
thunderbolt: Fix xhci check in usb4_switch_setup()
Browse files Browse the repository at this point in the history
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: b040798 ("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>
  • Loading branch information
Mika Westerberg authored and Greg Kroah-Hartman committed Jan 8, 2020
1 parent a00dfd4 commit c7a7ac8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/thunderbolt/usb4.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down

0 comments on commit c7a7ac8

Please sign in to comment.