diff options
Diffstat (limited to 'drivers/bluetooth')
-rw-r--r-- | drivers/bluetooth/btusb.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/bluetooth/btusb.c b/drivers/bluetooth/btusb.c index e70c57ee4221..124db8cd144c 100644 --- a/drivers/bluetooth/btusb.c +++ b/drivers/bluetooth/btusb.c | |||
@@ -301,7 +301,7 @@ static int btusb_submit_bulk_urb(struct hci_dev *hdev, gfp_t mem_flags) | |||
301 | struct urb *urb; | 301 | struct urb *urb; |
302 | unsigned char *buf; | 302 | unsigned char *buf; |
303 | unsigned int pipe; | 303 | unsigned int pipe; |
304 | int err, size; | 304 | int err, size = HCI_MAX_FRAME_SIZE; |
305 | 305 | ||
306 | BT_DBG("%s", hdev->name); | 306 | BT_DBG("%s", hdev->name); |
307 | 307 | ||
@@ -312,8 +312,6 @@ static int btusb_submit_bulk_urb(struct hci_dev *hdev, gfp_t mem_flags) | |||
312 | if (!urb) | 312 | if (!urb) |
313 | return -ENOMEM; | 313 | return -ENOMEM; |
314 | 314 | ||
315 | size = le16_to_cpu(data->bulk_rx_ep->wMaxPacketSize); | ||
316 | |||
317 | buf = kmalloc(size, mem_flags); | 315 | buf = kmalloc(size, mem_flags); |
318 | if (!buf) { | 316 | if (!buf) { |
319 | usb_free_urb(urb); | 317 | usb_free_urb(urb); |