mbox series

[0/4] usb: usbtmc: Fix changes for compatible IVI/VISA library

Message ID 20180924233032.2379-1-guido@kiener-muenchen.de (mailing list archive)
Headers show
Series usb: usbtmc: Fix changes for compatible IVI/VISA library | expand

Message

Guido Kiener Sept. 24, 2018, 11:30 p.m. UTC
Fix memory leak and uninitialized symbol 'actual' in usbtmc driver of
patch series:
[v6,00/22] usb: usbtmc: Changes needed for compatible IVI/VISA library
https://patchwork.kernel.org/cover/10596935/

Two errors are reported by 0-day service (smatch tool) when testing
branch usb-testing:

1. usbtmc_ioctl_request() warn: possible memory leak of 'buffer'
https://lists.01.org/pipermail/kbuild-all/2018-September/053023.html
2. usbtmc_ioctl_abort_bulk_in_tag() error: uninitialized symbol 'actual'
https://lists.01.org/pipermail/kbuild-all/2018-September/053024.html

Additionally the unitialized symbol 'actual' can cause similar
problems and show wrong debug kernel messages in the other functions
usbtmc_read() and usbtmc_ioctl_clear().

Guido Kiener (4):
  usb: usbtmc: Fix memory leak in usbtmc_ioctl_request
  usb: usbtmc: uninitialized symbol 'actual' in usbtmc_read
  usb: usbtmc: uninitialized symbol 'actual' in usbtmc_ioctl_clear
  usb: usbtmc: uninitialized symbol 'actual' in
    usbtmc_ioctl_abort_bulk_in_tag

 drivers/usb/class/usbtmc.c | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)