]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
Bluetooth: btintel_pcie: Remove unnecessary check before kfree_skb()
authorChen Ni <nichen@iscas.ac.cn>
Fri, 16 Jan 2026 08:07:03 +0000 (16:07 +0800)
committerLuiz Augusto von Dentz <luiz.von.dentz@intel.com>
Thu, 29 Jan 2026 18:33:38 +0000 (13:33 -0500)
The kfree_skb() function internally checks if the skb is NULL,
so an explicit check before calling it is redundant and can be removed.

Signed-off-by: Chen Ni <nichen@iscas.ac.cn>
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
drivers/bluetooth/btintel_pcie.c

index 2936b535479f268a5f286f83ea7447e57b93171a..3b035cb6a111eb9c8eaee7fca14337ea958e0d1d 100644 (file)
@@ -1190,8 +1190,7 @@ static int btintel_pcie_recv_frame(struct btintel_pcie_data *data,
        skb = NULL; /* skb is freed in the callee  */
 
 exit_error:
-       if (skb)
-               kfree_skb(skb);
+       kfree_skb(skb);
 
        if (ret)
                hdev->stat.err_rx++;