]> git.baikalelectronics.ru Git - kernel.git/commit
thunderbolt: Fix error code in tb_port_is_width_supported()
authorDan Carpenter <dan.carpenter@oracle.com>
Tue, 3 Mar 2020 10:17:16 +0000 (13:17 +0300)
committerMika Westerberg <mika.westerberg@linux.intel.com>
Wed, 4 Mar 2020 09:34:17 +0000 (12:34 +0300)
commit0bede1e5bd78adba1741f6eca169e7f6b95a5bad
treed8a4df1acdd23867b839f9e7bf0953d39ac54a66
parent5ffd64ecc0987e6f01533e7cc8fa89b7b34f793f
thunderbolt: Fix error code in tb_port_is_width_supported()

This function is type bool, and it's supposed to return true on success.
Unfortunately, this path takes negative error codes and casts them to
bool (true) so it's treated as success instead of failure.

Fixes: e97b06e67556 ("thunderbolt: Add support for lane bonding")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com>
drivers/thunderbolt/switch.c