[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20240516045118.18552-1-oneukum@suse.com>
Date: Thu, 16 May 2024 06:50:47 +0200
From: Oliver Neukum <oneukum@...e.com>
To: marcel@...tmann.org,
luiz.dentz@...il.com,
linux-bluetooth@...r.kernel.org,
linux-kernel@...r.kernel.org
Cc: Oliver Neukum <oneukum@...e.com>
Subject: [PATCH] bluetooth: btintel_pcie: nonsense error recording in irq
Either you return an error or you ignore it.
Recording it but then overwriting it makes no sense.
Signed-off-by: Oliver Neukum <oneukum@...e.com>
---
drivers/bluetooth/btintel_pcie.c | 8 ++------
1 file changed, 2 insertions(+), 6 deletions(-)
diff --git a/drivers/bluetooth/btintel_pcie.c b/drivers/bluetooth/btintel_pcie.c
index 590c188a4bb3..c507422d6b1b 100644
--- a/drivers/bluetooth/btintel_pcie.c
+++ b/drivers/bluetooth/btintel_pcie.c
@@ -498,19 +498,15 @@ static int btintel_pcie_submit_rx_work(struct btintel_pcie_data *data, u8 status
rfh_hdr = buf;
len = rfh_hdr->packet_len;
- if (len <= 0) {
- ret = -EINVAL;
+ if (len <= 0)
goto resubmit;
- }
/* Remove RFH header */
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.45.0
Powered by blists - more mailing lists