Patchwork [2/4] usb: initialise data element in Linux USB_DISCONNECT ioctl.

login
register
mail settings
Submitter Brad Hards
Date April 13, 2011, 9:45 a.m.
Message ID <1302687934-1287-3-git-send-email-bradh@frogmouth.net>
Download mbox | patch
Permalink /patch/90977/
State New
Headers show

Comments

Brad Hards - April 13, 2011, 9:45 a.m.
This isn't used, but leaving it empty causes valgrind noise.

Signed-off-by: Brad Hards <bradh@frogmouth.net>
---
 usb-linux.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

Patch

diff --git a/usb-linux.c b/usb-linux.c
index 255009f..d958853 100644
--- a/usb-linux.c
+++ b/usb-linux.c
@@ -344,6 +344,7 @@  static int usb_host_claim_interfaces(USBHostDevice *dev, int configuration)
         for (interface = 0; interface < nb_interfaces; interface++) {
             ctrl.ioctl_code = USBDEVFS_DISCONNECT;
             ctrl.ifno = interface;
+            ctrl.data = 0;
             ret = ioctl(dev->fd, USBDEVFS_IOCTL, &ctrl);
             if (ret < 0 && errno != ENODATA) {
                 perror("USBDEVFS_DISCONNECT");