Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

Bluetooth: Remove pointless parameter check in dtl1_hci_send_frame()

The hdev parameter of dtl1_hci_send_frame() is always valid. If it
were not valid, then it would have crashed earlier in the call chain.

Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>

authored by

Marcel Holtmann and committed by
Johan Hedberg
03b31868 6b5924bf

+1 -8
+1 -8
drivers/bluetooth/dtl1_cs.c
··· 384 384 385 385 static int dtl1_hci_send_frame(struct hci_dev *hdev, struct sk_buff *skb) 386 386 { 387 - dtl1_info_t *info; 387 + dtl1_info_t *info = hci_get_drvdata(hdev); 388 388 struct sk_buff *s; 389 389 nsh_t nsh; 390 - 391 - if (!hdev) { 392 - BT_ERR("Frame for unknown HCI device (hdev=NULL)"); 393 - return -ENODEV; 394 - } 395 - 396 - info = hci_get_drvdata(hdev); 397 390 398 391 switch (bt_cb(skb)->pkt_type) { 399 392 case HCI_COMMAND_PKT: