Commit 9a831903 authored by Guido Kiener's avatar Guido Kiener Committed by Greg Kroah-Hartman

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: default avatarGuido Kiener <guido.kiener@rohde-schwarz.com>
Fixes: dfee02ac ("usb: usbtmc: Fix ioctl USBTMC_IOCTL_CLEAR")
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent b690020a
...@@ -1679,6 +1679,7 @@ static int usbtmc_ioctl_clear(struct usbtmc_device_data *data) ...@@ -1679,6 +1679,7 @@ static int usbtmc_ioctl_clear(struct usbtmc_device_data *data)
do { do {
dev_dbg(dev, "Reading from bulk in EP\n"); dev_dbg(dev, "Reading from bulk in EP\n");
actual = 0;
rv = usb_bulk_msg(data->usb_dev, rv = usb_bulk_msg(data->usb_dev,
usb_rcvbulkpipe(data->usb_dev, usb_rcvbulkpipe(data->usb_dev,
data->bulk_in), data->bulk_in),
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment