Commit fb4d672
USB: serial: ti_usb_3410_5052: fix control-message error handling
commit 39712e8bfa8d3aa6ce1e60fc9d62c9b076c17a30 upstream.
Make sure to detect and return an error on zero-length control-message
transfers when reading from the device.
This addresses a potential failure to detect an empty transmit buffer
during close.
Also remove a redundant check for short transfer when sending a command.
Fixes: 1da177e ("Linux-2.6.12-rc2")
Reviewed-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Johan Hovold <johan@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>1 parent 5fbabc9 commit fb4d672
1 file changed
Lines changed: 4 additions & 8 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1352 | 1352 | | |
1353 | 1353 | | |
1354 | 1354 | | |
1355 | | - | |
1356 | | - | |
1357 | | - | |
1358 | | - | |
1359 | | - | |
| 1355 | + | |
| 1356 | + | |
1360 | 1357 | | |
1361 | | - | |
| 1358 | + | |
1362 | 1359 | | |
1363 | 1360 | | |
1364 | 1361 | | |
| |||
1374 | 1371 | | |
1375 | 1372 | | |
1376 | 1373 | | |
1377 | | - | |
1378 | | - | |
| 1374 | + | |
1379 | 1375 | | |
1380 | 1376 | | |
1381 | 1377 | | |
| |||
0 commit comments