Commit ba093cdd authored by Andrew Morton's avatar Andrew Morton Committed by Linus Torvalds

[PATCH] BUG fix for drivers/bluetooth/hci_usb.c

From: Vinay K Nallamothu <vinay-rc@naturesoft.net>

The patch below fixes two pointer reference bugs (shows up as compile
time warnings given below) which wrongly take the address of "struct
usb_interface*".

	drivers/bluetooth/hci_usb.c: In function `hci_usb_probe':
	drivers/bluetooth/hci_usb.c:786: warning: assignment from incompatible pointer type
	drivers/bluetooth/hci_usb.c:810: warning: assignment from incompatible pointer type
parent 83415795
...@@ -783,7 +783,7 @@ int hci_usb_probe(struct usb_interface *intf, const struct usb_device_id *id) ...@@ -783,7 +783,7 @@ int hci_usb_probe(struct usb_interface *intf, const struct usb_device_id *id)
BT_DBG("udev %p ifnum %d", udev, ifnum); BT_DBG("udev %p ifnum %d", udev, ifnum);
iface = &udev->actconfig->interface[0]; iface = udev->actconfig->interface[0];
/* Check our black list */ /* Check our black list */
if (usb_match_id(intf, ignore_ids)) if (usb_match_id(intf, ignore_ids))
...@@ -807,7 +807,7 @@ int hci_usb_probe(struct usb_interface *intf, const struct usb_device_id *id) ...@@ -807,7 +807,7 @@ int hci_usb_probe(struct usb_interface *intf, const struct usb_device_id *id)
ifn = min_t(unsigned int, udev->actconfig->desc.bNumInterfaces, HCI_MAX_IFACE_NUM); ifn = min_t(unsigned int, udev->actconfig->desc.bNumInterfaces, HCI_MAX_IFACE_NUM);
for (i = 0; i < ifn; i++) { for (i = 0; i < ifn; i++) {
iface = &udev->actconfig->interface[i]; iface = udev->actconfig->interface[i];
for (a = 0; a < iface->num_altsetting; a++) { for (a = 0; a < iface->num_altsetting; a++) {
uif = &iface->altsetting[a]; uif = &iface->altsetting[a];
for (e = 0; e < uif->desc.bNumEndpoints; e++) { for (e = 0; e < uif->desc.bNumEndpoints; e++) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment