]> git.baikalelectronics.ru Git - kernel.git/commit
thunderbolt: Check return value of tb_sw_read() in usb4_switch_op()
authorMika Westerberg <mika.westerberg@linux.intel.com>
Thu, 9 Apr 2020 07:18:10 +0000 (10:18 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 28 Apr 2020 17:00:59 +0000 (19:00 +0200)
commitb31c238f6197aa2d7e172d08ad6bb451a32e7eb5
tree16e27b3fac5280ec7405c0a4a86f6be5edb72331
parenta3c98f842c1888b4df27e091ed5a315b6f7c1aa9
thunderbolt: Check return value of tb_sw_read() in usb4_switch_op()

The function misses checking return value of tb_sw_read() before it
accesses the value that was read. Fix this by checking the return value
first.

Fixes: 469e0ed31b42 ("thunderbolt: Add initial support for USB4")
Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Reviewed-by: Yehezkel Bernat <yehezkelshb@gmail.com>
Cc: stable <stable@vger.kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/thunderbolt/usb4.c