mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] Bluetooth: btintel_pcie: Remove unnecessary check before kfree_skb()
@ 2026-01-16  8:07 Chen Ni
  2026-01-20 18:20 ` patchwork-bot+bluetooth
  0 siblings, 1 reply; 2+ messages in thread
From: Chen Ni @ 2026-01-16  8:07 UTC (permalink / raw)
  To: marcel, luiz.dentz; +Cc: linux-bluetooth, linux-kernel, Chen Ni

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>
---
 drivers/bluetooth/btintel_pcie.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/bluetooth/btintel_pcie.c b/drivers/bluetooth/btintel_pcie.c
index 2936b535479f..3b035cb6a111 100644
--- a/drivers/bluetooth/btintel_pcie.c
+++ b/drivers/bluetooth/btintel_pcie.c
@@ -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++;
-- 
2.25.1


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] Bluetooth: btintel_pcie: Remove unnecessary check before kfree_skb()
  2026-01-16  8:07 [PATCH] Bluetooth: btintel_pcie: Remove unnecessary check before kfree_skb() Chen Ni
@ 2026-01-20 18:20 ` patchwork-bot+bluetooth
  0 siblings, 0 replies; 2+ messages in thread
From: patchwork-bot+bluetooth @ 2026-01-20 18:20 UTC (permalink / raw)
  To: Chen Ni; +Cc: marcel, luiz.dentz, linux-bluetooth, linux-kernel

Hello:

This patch was applied to bluetooth/bluetooth-next.git (master)
by Luiz Augusto von Dentz <luiz.von.dentz@intel.com>:

On Fri, 16 Jan 2026 16:07:03 +0800 you wrote:
> 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>
> ---
>  drivers/bluetooth/btintel_pcie.c | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)

Here is the summary with links:
  - Bluetooth: btintel_pcie: Remove unnecessary check before kfree_skb()
    https://git.kernel.org/bluetooth/bluetooth-next/c/c170a61739fa

You are awesome, thank you!
-- 
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html



^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2026-01-20 18:20 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-01-16  8:07 [PATCH] Bluetooth: btintel_pcie: Remove unnecessary check before kfree_skb() Chen Ni
2026-01-20 18:20 ` patchwork-bot+bluetooth

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome