diff options
author | Guido Kiener <guido.kiener@rohde-schwarz.com> | 2018-09-24 19:30:30 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2018-09-28 09:12:08 -0400 |
commit | b690020a498e33c098dd2b5554a7a59fc08b5ca4 (patch) | |
tree | 9643a84ee5a05c1f0a6975883b27234d062c0469 | |
parent | 100f2cdeadffb3e63121d1d59a60a9882258c415 (diff) |
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: d7604ff0dc01 ("usb: usbtmc: Optimize usbtmc_read")
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r-- | drivers/usb/class/usbtmc.c | 1 |
1 files changed, 1 insertions, 0 deletions
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, | |||
1370 | 1370 | ||
1371 | /* Loop until we have fetched everything we requested */ | 1371 | /* Loop until we have fetched everything we requested */ |
1372 | remaining = count; | 1372 | remaining = count; |
1373 | actual = 0; | ||
1373 | 1374 | ||
1374 | /* Send bulk URB */ | 1375 | /* Send bulk URB */ |
1375 | retval = usb_bulk_msg(data->usb_dev, | 1376 | retval = usb_bulk_msg(data->usb_dev, |