Skip to content
Commit 61684c0f authored by Gil Fine's avatar Gil Fine Committed by Mika Westerberg
Browse files

thunderbolt: Fix uninitialized variable in tb_tunnel_alloc_usb3()



Currently in case of no bandwidth available for USB3 tunnel, we are left
with uninitialized variable that can lead to huge negative allocated
bandwidth.

Fix this by initializing the variable to zero. While there, fix the
kernel-doc to describe more accurately the purpose of the function
tb_tunnel_alloc_usb3().

Reported-by: default avatarDan Carpenter <dan.carpenter@linaro.org>
Closes: https://lore.kernel.org/linux-usb/6289898b-cd63-4fb8-906a-1b6977321af9@moroto.mountain/


Fixes: 25d905d2 ("thunderbolt: Allow USB3 bandwidth to be lower than maximum supported")
Signed-off-by: default avatarGil Fine <gil.fine@linux.intel.com>
Signed-off-by: default avatarMika Westerberg <mika.westerberg@linux.intel.com>
parent a3ad3a90
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment