Commit 61684c0
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: Dan Carpenter <[email protected]>
Closes: https://lore.kernel.org/linux-usb/[email protected]/
Fixes: 25d905d ("thunderbolt: Allow USB3 bandwidth to be lower than maximum supported")
Signed-off-by: Gil Fine <[email protected]>
Signed-off-by: Mika Westerberg <[email protected]>1 parent a3ad3a9 commit 61684c0
1 file changed
+5
-5
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2048 | 2048 | | |
2049 | 2049 | | |
2050 | 2050 | | |
2051 | | - | |
2052 | | - | |
2053 | | - | |
2054 | | - | |
| 2051 | + | |
| 2052 | + | |
| 2053 | + | |
| 2054 | + | |
2055 | 2055 | | |
2056 | 2056 | | |
2057 | 2057 | | |
| |||
2064 | 2064 | | |
2065 | 2065 | | |
2066 | 2066 | | |
2067 | | - | |
| 2067 | + | |
2068 | 2068 | | |
2069 | 2069 | | |
2070 | 2070 | | |
| |||
0 commit comments