git.openpandora.org
/
pandora-kernel.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
[Bluetooth] Fix double frees on error paths of btusb and bpa10x drivers
[pandora-kernel.git]
/
drivers
/
bluetooth
/
bpa10x.c
diff --git
a/drivers/bluetooth/bpa10x.c
b/drivers/bluetooth/bpa10x.c
index
1375b53
..
32f3a8e
100644
(file)
--- a/
drivers/bluetooth/bpa10x.c
+++ b/
drivers/bluetooth/bpa10x.c
@@
-40,9
+40,7
@@
#define BT_DBG(D...)
#endif
#define BT_DBG(D...)
#endif
-#define VERSION "0.9"
-
-static int ignore = 0;
+#define VERSION "0.10"
static struct usb_device_id bpa10x_table[] = {
/* Tektronix BPA 100/105 (Digianswer) */
static struct usb_device_id bpa10x_table[] = {
/* Tektronix BPA 100/105 (Digianswer) */
@@
-258,7
+256,6
@@
static inline int bpa10x_submit_intr_urb(struct hci_dev *hdev)
BT_ERR("%s urb %p submission failed (%d)",
hdev->name, urb, -err);
usb_unanchor_urb(urb);
BT_ERR("%s urb %p submission failed (%d)",
hdev->name, urb, -err);
usb_unanchor_urb(urb);
- kfree(buf);
}
usb_free_urb(urb);
}
usb_free_urb(urb);
@@
-300,7
+297,6
@@
static inline int bpa10x_submit_bulk_urb(struct hci_dev *hdev)
BT_ERR("%s urb %p submission failed (%d)",
hdev->name, urb, -err);
usb_unanchor_urb(urb);
BT_ERR("%s urb %p submission failed (%d)",
hdev->name, urb, -err);
usb_unanchor_urb(urb);
- kfree(buf);
}
usb_free_urb(urb);
}
usb_free_urb(urb);
@@
-423,6
+419,7
@@
static int bpa10x_send_frame(struct sk_buff *skb)
break;
default:
break;
default:
+ usb_free_urb(urb);
return -EILSEQ;
}
return -EILSEQ;
}
@@
-459,9
+456,6
@@
static int bpa10x_probe(struct usb_interface *intf, const struct usb_device_id *
BT_DBG("intf %p id %p", intf, id);
BT_DBG("intf %p id %p", intf, id);
- if (ignore)
- return -ENODEV;
-
if (intf->cur_altsetting->desc.bInterfaceNumber != 0)
return -ENODEV;
if (intf->cur_altsetting->desc.bInterfaceNumber != 0)
return -ENODEV;
@@
-545,9
+539,6
@@
static void __exit bpa10x_exit(void)
module_init(bpa10x_init);
module_exit(bpa10x_exit);
module_init(bpa10x_init);
module_exit(bpa10x_exit);
-module_param(ignore, bool, 0644);
-MODULE_PARM_DESC(ignore, "Ignore devices from the matching table");
-
MODULE_AUTHOR("Marcel Holtmann <marcel@holtmann.org>");
MODULE_DESCRIPTION("Digianswer Bluetooth USB driver ver " VERSION);
MODULE_VERSION(VERSION);
MODULE_AUTHOR("Marcel Holtmann <marcel@holtmann.org>");
MODULE_DESCRIPTION("Digianswer Bluetooth USB driver ver " VERSION);
MODULE_VERSION(VERSION);