public inbox for linux-bluetooth@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] bluetooth: btintel_pcie: nonsense error recording in irq
@ 2024-05-16  4:50 Oliver Neukum
  2024-05-16  5:33 ` bluez.test.bot
  2024-05-16  5:44 ` [PATCH] " Paul Menzel
  0 siblings, 2 replies; 3+ messages in thread
From: Oliver Neukum @ 2024-05-16  4:50 UTC (permalink / raw)
  To: marcel, luiz.dentz, linux-bluetooth, linux-kernel; +Cc: Oliver Neukum

Either you return an error or you ignore it.
Recording it but then overwriting it makes no sense.

Signed-off-by: Oliver Neukum <oneukum@suse.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


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

end of thread, other threads:[~2024-05-16  5:45 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-05-16  4:50 [PATCH] bluetooth: btintel_pcie: nonsense error recording in irq Oliver Neukum
2024-05-16  5:33 ` bluez.test.bot
2024-05-16  5:44 ` [PATCH] " Paul Menzel

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox