Bluetooth: Remove pointless check of hci_send_frame parameter
Subsystems (2)
Marcel Holtmann
maintainerPATCH 1/1 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 <[email protected]>
--- net/bluetooth/hci_core.c | 5 ----- 1 file changed, 5 deletions(-)
net/bluetooth/hci_core.c +0 -5
@@ -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 */
Signature · 1 line
1.8.3.1
Johan Hedberg
AppliedHi Marcel,
Quoted 8 lines · Marcel Holtmann
The hdev parameter of
hci_send_framemust 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 <[email protected]>--- net/bluetooth/hci_core.c | 5 ----- 1 file changed, 5 deletions(-)
Applied to bluetooth-next. Thanks.
Johan