浏览代码

[Bluetooth] Ignore additional interfaces of BPA 100/105 devices

If a BPA 100/105 device contains more then one interface then ignore the
additional interfaces, because they are unused.

Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Marcel Holtmann 20 年之前
父节点
当前提交
245dc3d19b
共有 1 个文件被更改,包括 3 次插入0 次删除
  1. 3 0
      drivers/bluetooth/bpa10x.c

+ 3 - 0
drivers/bluetooth/bpa10x.c

@@ -550,6 +550,9 @@ static int bpa10x_probe(struct usb_interface *intf, const struct usb_device_id *
 	if (ignore)
 	if (ignore)
 		return -ENODEV;
 		return -ENODEV;
 
 
+	if (intf->cur_altsetting->desc.bInterfaceNumber > 0)
+		return -ENODEV;
+
 	data = kmalloc(sizeof(*data), GFP_KERNEL);
 	data = kmalloc(sizeof(*data), GFP_KERNEL);
 	if (!data) {
 	if (!data) {
 		BT_ERR("Can't allocate data structure");
 		BT_ERR("Can't allocate data structure");