usb: initialise data element in Linux USB_DISCONNECT ioctl
This isn't used, but leaving it empty causes valgrind noise. Signed-off-by: Brad Hards <bradh@frogmouth.net> Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
This commit is contained in:
parent
94843f66ab
commit
021730f728
|
@ -344,6 +344,7 @@ static int usb_host_claim_interfaces(USBHostDevice *dev, int configuration)
|
||||||
for (interface = 0; interface < nb_interfaces; interface++) {
|
for (interface = 0; interface < nb_interfaces; interface++) {
|
||||||
ctrl.ioctl_code = USBDEVFS_DISCONNECT;
|
ctrl.ioctl_code = USBDEVFS_DISCONNECT;
|
||||||
ctrl.ifno = interface;
|
ctrl.ifno = interface;
|
||||||
|
ctrl.data = 0;
|
||||||
ret = ioctl(dev->fd, USBDEVFS_IOCTL, &ctrl);
|
ret = ioctl(dev->fd, USBDEVFS_IOCTL, &ctrl);
|
||||||
if (ret < 0 && errno != ENODATA) {
|
if (ret < 0 && errno != ENODATA) {
|
||||||
perror("USBDEVFS_DISCONNECT");
|
perror("USBDEVFS_DISCONNECT");
|
||||||
|
|
Loading…
Reference in a new issue