From: Guido Kiener <guido.kiener@xxxxxxxxxxxxxxxxx> 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@xxxxxxxxxxxxxxxxx> Fixes: d7604ff0dc01 ("usb: usbtmc: Optimize usbtmc_read") --- drivers/usb/class/usbtmc.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/usb/class/usbtmc.c b/drivers/usb/class/usbtmc.c index dfbcf418dad7..9cb90603f71f 100644 --- a/drivers/usb/class/usbtmc.c +++ b/drivers/usb/class/usbtmc.c @@ -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, -- 2.17.1