]> www.infradead.org Git - users/dwmw2/linux.git/commitdiff
Bluetooth: btintel_pcie: remove redundant assignment to variable ret
authorColin Ian King <colin.i.king@gmail.com>
Mon, 7 Oct 2024 16:10:35 +0000 (17:10 +0100)
committerLuiz Augusto von Dentz <luiz.von.dentz@intel.com>
Thu, 14 Nov 2024 20:33:07 +0000 (15:33 -0500)
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>
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
drivers/bluetooth/btintel_pcie.c

index fd4a8bd056fa92eb14c4bb763954bfcc74f207b7..9681a4b8a66a17ecf05c258e067f47a632bb6dfb 100644 (file)
@@ -752,10 +752,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);