diff options
-rw-r--r-- | drivers/bluetooth/bfusb.c | 9 |
1 files changed, 1 insertions, 8 deletions
diff --git a/drivers/bluetooth/bfusb.c b/drivers/bluetooth/bfusb.c index a6758490fa61..cce23041118f 100644 --- a/drivers/bluetooth/bfusb.c +++ b/drivers/bluetooth/bfusb.c | |||
@@ -466,23 +466,16 @@ static int bfusb_close(struct hci_dev *hdev) | |||
466 | 466 | ||
467 | static int bfusb_send_frame(struct hci_dev *hdev, struct sk_buff *skb) | 467 | static int bfusb_send_frame(struct hci_dev *hdev, struct sk_buff *skb) |
468 | { | 468 | { |
469 | struct bfusb_data *data; | 469 | struct bfusb_data *data = hci_get_drvdata(hdev); |
470 | struct sk_buff *nskb; | 470 | struct sk_buff *nskb; |
471 | unsigned char buf[3]; | 471 | unsigned char buf[3]; |
472 | int sent = 0, size, count; | 472 | int sent = 0, size, count; |
473 | 473 | ||
474 | BT_DBG("hdev %p skb %p type %d len %d", hdev, skb, bt_cb(skb)->pkt_type, skb->len); | 474 | BT_DBG("hdev %p skb %p type %d len %d", hdev, skb, bt_cb(skb)->pkt_type, skb->len); |
475 | 475 | ||
476 | if (!hdev) { | ||
477 | BT_ERR("Frame for unknown HCI device (hdev=NULL)"); | ||
478 | return -ENODEV; | ||
479 | } | ||
480 | |||
481 | if (!test_bit(HCI_RUNNING, &hdev->flags)) | 476 | if (!test_bit(HCI_RUNNING, &hdev->flags)) |
482 | return -EBUSY; | 477 | return -EBUSY; |
483 | 478 | ||
484 | data = hci_get_drvdata(hdev); | ||
485 | |||
486 | switch (bt_cb(skb)->pkt_type) { | 479 | switch (bt_cb(skb)->pkt_type) { |
487 | case HCI_COMMAND_PKT: | 480 | case HCI_COMMAND_PKT: |
488 | hdev->stat.cmd_tx++; | 481 | hdev->stat.cmd_tx++; |