Commit 7585b97a authored by Wei Yongjun's avatar Wei Yongjun Committed by Marcel Holtmann

Bluetooth: Remove some pointless conditionals before kfree_skb()

Remove some pointless conditionals before kfree_skb().
Signed-off-by: default avatarWei Yongjun <yjwei@cn.fujitsu.com>
Signed-off-by: default avatarMarcel Holtmann <marcel@holtmann.org>
parent 2ae9a6be
...@@ -126,7 +126,6 @@ static inline void cmtp_add_msgpart(struct cmtp_session *session, int id, const ...@@ -126,7 +126,6 @@ static inline void cmtp_add_msgpart(struct cmtp_session *session, int id, const
session->reassembly[id] = nskb; session->reassembly[id] = nskb;
if (skb)
kfree_skb(skb); kfree_skb(skb);
} }
......
...@@ -1565,7 +1565,6 @@ static void hci_cmd_task(unsigned long arg) ...@@ -1565,7 +1565,6 @@ static void hci_cmd_task(unsigned long arg)
/* Send queued commands */ /* Send queued commands */
if (atomic_read(&hdev->cmd_cnt) && (skb = skb_dequeue(&hdev->cmd_q))) { if (atomic_read(&hdev->cmd_cnt) && (skb = skb_dequeue(&hdev->cmd_q))) {
if (hdev->sent_cmd)
kfree_skb(hdev->sent_cmd); kfree_skb(hdev->sent_cmd);
if ((hdev->sent_cmd = skb_clone(skb, GFP_ATOMIC))) { if ((hdev->sent_cmd = skb_clone(skb, GFP_ATOMIC))) {
......
...@@ -518,7 +518,6 @@ static void l2cap_conn_del(struct hci_conn *hcon, int err) ...@@ -518,7 +518,6 @@ static void l2cap_conn_del(struct hci_conn *hcon, int err)
BT_DBG("hcon %p conn %p, err %d", hcon, conn, err); BT_DBG("hcon %p conn %p, err %d", hcon, conn, err);
if (conn->rx_skb)
kfree_skb(conn->rx_skb); kfree_skb(conn->rx_skb);
/* Kill channels */ /* Kill channels */
......
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