The Linux Kernel Mailing List
 help / color / mirror / Atom feed
* [PATCH][next] Bluetooth: btintel_pcie: remove redundant assignment to variable ret
@ 2024-10-07 16:10 Colin Ian King
  2024-10-21 17:42 ` patchwork-bot+bluetooth
  0 siblings, 1 reply; 2+ messages in thread
From: Colin Ian King @ 2024-10-07 16:10 UTC (permalink / raw)
  To: Marcel Holtmann, Luiz Augusto von Dentz, linux-bluetooth
  Cc: kernel-janitors, linux-kernel

The variable ret is being assigned -ENOMEM however this is never
read and it is being re-assigned a new value when the code jumps
to label resubmit. The assignment is redundant and can be removed.

Signed-off-by: Colin Ian King <colin.i.king@gmail.com>
---
 drivers/bluetooth/btintel_pcie.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/bluetooth/btintel_pcie.c b/drivers/bluetooth/btintel_pcie.c
index 5252125b003f..2c5d1edf1919 100644
--- a/drivers/bluetooth/btintel_pcie.c
+++ b/drivers/bluetooth/btintel_pcie.c
@@ -516,10 +516,8 @@ static int btintel_pcie_submit_rx_work(struct btintel_pcie_data *data, u8 status
 	buf += sizeof(*rfh_hdr);
 
 	skb = alloc_skb(len, GFP_ATOMIC);
-	if (!skb) {
-		ret = -ENOMEM;
+	if (!skb)
 		goto resubmit;
-	}
 
 	skb_put_data(skb, buf, len);
 	skb_queue_tail(&data->rx_skb_q, skb);
-- 
2.39.5


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

* Re: [PATCH][next] Bluetooth: btintel_pcie: remove redundant assignment to variable ret
  2024-10-07 16:10 [PATCH][next] Bluetooth: btintel_pcie: remove redundant assignment to variable ret Colin Ian King
@ 2024-10-21 17:42 ` patchwork-bot+bluetooth
  0 siblings, 0 replies; 2+ messages in thread
From: patchwork-bot+bluetooth @ 2024-10-21 17:42 UTC (permalink / raw)
  To: Colin Ian King
  Cc: marcel, luiz.dentz, linux-bluetooth, kernel-janitors,
	linux-kernel

Hello:

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

On Mon,  7 Oct 2024 17:10:35 +0100 you wrote:
> The variable ret is being assigned -ENOMEM however this is never
> read and it is being re-assigned a new value when the code jumps
> to label resubmit. The assignment is redundant and can be removed.
> 
> Signed-off-by: Colin Ian King <colin.i.king@gmail.com>
> ---
>  drivers/bluetooth/btintel_pcie.c | 4 +---
>  1 file changed, 1 insertion(+), 3 deletions(-)

Here is the summary with links:
  - [next] Bluetooth: btintel_pcie: remove redundant assignment to variable ret
    https://git.kernel.org/bluetooth/bluetooth-next/c/e14edcbe88ba

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:[~2024-10-21 17:42 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-10-07 16:10 [PATCH][next] Bluetooth: btintel_pcie: remove redundant assignment to variable ret Colin Ian King
2024-10-21 17:42 ` 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