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: dfee02ac4b ("usb: usbtmc: Fix ioctl USBTMC_IOCTL_CLEAR")
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
Guido Kiener 2018-09-25 01:30:31 +02:00 committed by Greg Kroah-Hartman
parent b690020a49
commit 9a83190300

View File

@ -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),