summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>2020-03-10 17:42:55 +0100
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2020-03-10 17:42:55 +0100
commitc08ab390b68305ac415ecd7e5ea7f9c2a28105e0 (patch)
tree6968ea3ab58c14247787184a1b11dc407ab909f6
parent2c523b344dfa65a3738e7039832044aa133c75fb (diff)
parente9d0e7511fda92a6511904996dd0aa57b6d7687a (diff)
downloadlinux-c08ab390b68305ac415ecd7e5ea7f9c2a28105e0.tar.gz
linux-c08ab390b68305ac415ecd7e5ea7f9c2a28105e0.tar.bz2
linux-c08ab390b68305ac415ecd7e5ea7f9c2a28105e0.zip
Merge tag 'thunderbolt-fix-for-v5.6-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/westeri/thunderbolt into usb-linus
Mika writes: thunderbolt: Fix for v5.6-rc6 This includes a single commit that fixes incorrect return value from tb_port_is_width_supported() if the read fails. * tag 'thunderbolt-fix-for-v5.6-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/westeri/thunderbolt: thunderbolt: Fix error code in tb_port_is_width_supported()
-rw-r--r--drivers/thunderbolt/switch.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/thunderbolt/switch.c b/drivers/thunderbolt/switch.c
index 7d6ecc342508..a2ce99051c51 100644
--- a/drivers/thunderbolt/switch.c
+++ b/drivers/thunderbolt/switch.c
@@ -954,7 +954,7 @@ static bool tb_port_is_width_supported(struct tb_port *port, int width)
ret = tb_port_read(port, &phy, TB_CFG_PORT,
port->cap_phy + LANE_ADP_CS_0, 1);
if (ret)
- return ret;
+ return false;
widths = (phy & LANE_ADP_CS_0_SUPPORTED_WIDTH_MASK) >>
LANE_ADP_CS_0_SUPPORTED_WIDTH_SHIFT;