diff mbox series

[next] Bluetooth: btintel_pcie: remove redundant assignment to variable ret

Message ID 20241007161035.1205516-1-colin.i.king@gmail.com
State Accepted
Commit e14edcbe88bac39e7515f132c9be50a916bc020b
Headers show
Series [next] Bluetooth: btintel_pcie: remove redundant assignment to variable ret | expand

Commit Message

Colin Ian King Oct. 7, 2024, 4:10 p.m. UTC
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(-)

Comments

patchwork-bot+bluetooth@kernel.org Oct. 21, 2024, 5:42 p.m. UTC | #1
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!
diff mbox series

Patch

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);