mirror of
https://github.com/torvalds/linux.git
synced 2024-11-24 13:11:40 +00:00
usb: usbtmc: uninitialized symbol 'actual' in usbtmc_read
Fix uninitialized symbol 'actual' in function usbtmc_read.
When symbol 'actual' is not initialized and usb_bulk_msg() fails,
the subsequent kernel debug message shows a random value.
Signed-off-by: Guido Kiener <guido.kiener@rohde-schwarz.com>
Fixes: d7604ff0dc
("usb: usbtmc: Optimize usbtmc_read")
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
100f2cdead
commit
b690020a49
@ -1370,6 +1370,7 @@ static ssize_t usbtmc_read(struct file *filp, char __user *buf,
|
||||
|
||||
/* Loop until we have fetched everything we requested */
|
||||
remaining = count;
|
||||
actual = 0;
|
||||
|
||||
/* Send bulk URB */
|
||||
retval = usb_bulk_msg(data->usb_dev,
|
||||
|
Loading…
Reference in New Issue
Block a user