diff options
author | Guido Kiener <guido.kiener@rohde-schwarz.com> | 2018-09-25 01:30:31 +0200 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2018-09-28 15:12:08 +0200 |
commit | 9a83190300867fb024d53f47c31088e34188efc1 (patch) | |
tree | 3624fad2e64089cea009ede8bbf98ea7744e37e8 /drivers | |
parent | b690020a498e33c098dd2b5554a7a59fc08b5ca4 (diff) | |
download | lwn-9a83190300867fb024d53f47c31088e34188efc1.tar.gz lwn-9a83190300867fb024d53f47c31088e34188efc1.zip |
usb: usbtmc: uninitialized symbol 'actual' in usbtmc_ioctl_clear
Fix uninitialized symbol 'actual' in function usbtmc_ioctl_clear.
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: dfee02ac4bce ("usb: usbtmc: Fix ioctl USBTMC_IOCTL_CLEAR")
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers')
-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 9cb90603f71f..7184fa035434 100644 --- a/drivers/usb/class/usbtmc.c +++ b/drivers/usb/class/usbtmc.c @@ -1679,6 +1679,7 @@ usbtmc_clear_check_status: do { dev_dbg(dev, "Reading from bulk in EP\n"); + actual = 0; rv = usb_bulk_msg(data->usb_dev, usb_rcvbulkpipe(data->usb_dev, data->bulk_in), |