From: Marcel Holtmann Date: Thu, 10 Oct 2013 21:54:18 +0000 (-0700) Subject: Bluetooth: Remove pointless check of hci_send_frame parameter X-Git-Tag: next-20131017~61^2~122 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=3d386acea090e7af3346de59d9e322f92128a4b1;p=karo-tx-linux.git 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: Marcel Holtmann Signed-off-by: Johan Hedberg --- diff --git a/net/bluetooth/hci_core.c b/net/bluetooth/hci_core.c index 925bd47c4a3c..47cf3a95dac0 100644 --- a/net/bluetooth/hci_core.c +++ b/net/bluetooth/hci_core.c @@ -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 */