Skip to content

Commit

Permalink
Bluetooth: Remove pointless check of hci_send_frame parameter
Browse files Browse the repository at this point in the history
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: Marcel Holtmann <marcel@holtmann.org>
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
  • Loading branch information
Marcel Holtmann authored and Johan Hedberg committed Oct 10, 2013
1 parent 57d17d7 commit 3d386ac
Showing 1 changed file with 0 additions and 5 deletions.
5 changes: 0 additions & 5 deletions net/bluetooth/hci_core.c
Original file line number Diff line number Diff line change
Expand Up @@ -2699,11 +2699,6 @@ EXPORT_SYMBOL(hci_unregister_cb);

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);

/* Time stamp */
Expand Down

0 comments on commit 3d386ac

Please sign in to comment.