Skip to contentSkip to conversation

Bluetooth: btintel_pcie: remove redundant assignment to variable ret

PATCH Applied Colin Ian King 2 participants 2 messages Oct 7, 2024 – Oct 21, 2024

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Bluetooth: btintel_pcie: remove redundant assignment to variable ret

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.

---
 drivers/bluetooth/btintel_pcie.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)
drivers/bluetooth/btintel_pcie.c +1 -3
index 5252125b003f..2c5d1edf1919 100644
@@ -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);
Signature · 1 line
2.39.5
#1 lore raw
This patch was applied to bluetooth/bluetooth-next.git (master) by Luiz Augusto von Dentz <[email protected]>:

Hello:

This patch was applied to bluetooth/bluetooth-next.git (master) by Luiz Augusto von Dentz <[email protected]>:

Quoted 8 lines · 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.

---
 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!

Signature · 2 lines
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html