提交 021730f7 编写于 作者: B Brad Hards 提交者: Stefan Hajnoczi

usb: initialise data element in Linux USB_DISCONNECT ioctl

This isn't used, but leaving it empty causes valgrind noise.
Signed-off-by: NBrad Hards <bradh@frogmouth.net>
Signed-off-by: NStefan Hajnoczi <stefanha@linux.vnet.ibm.com>
上级 94843f66
...@@ -344,6 +344,7 @@ static int usb_host_claim_interfaces(USBHostDevice *dev, int configuration) ...@@ -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");
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册