Commit 3d386ace authored by Marcel Holtmann's avatar Marcel Holtmann Committed by Johan Hedberg

Bluetooth: Remove pointless check of hci_send_frame parameter

The hdev parameter of hci_send_frame must be always valid. If the hdev
is not valid, it would not even make it to this stage. The callers
will have already accessed hdev at that point many times.
Signed-off-by: default avatarMarcel Holtmann <marcel@holtmann.org>
Signed-off-by: default avatarJohan Hedberg <johan.hedberg@intel.com>
parent 57d17d70
...@@ -2699,11 +2699,6 @@ EXPORT_SYMBOL(hci_unregister_cb); ...@@ -2699,11 +2699,6 @@ EXPORT_SYMBOL(hci_unregister_cb);
static int hci_send_frame(struct hci_dev *hdev, struct sk_buff *skb) static int hci_send_frame(struct hci_dev *hdev, struct sk_buff *skb)
{ {
if (!hdev) {
kfree_skb(skb);
return -ENODEV;
}
BT_DBG("%s type %d len %d", hdev->name, bt_cb(skb)->pkt_type, skb->len); BT_DBG("%s type %d len %d", hdev->name, bt_cb(skb)->pkt_type, skb->len);
/* Time stamp */ /* Time stamp */
......
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