Thread (2 messages) 2 messages, 2 authors, 2017-12-19

[PATCH] isdn: avm: Handle return value of skb_dequeue()

flat view
STALE3229d

From: Arvind Yadav <hidden>
Date: 2017-12-16 19:47:38
Also in: lkml
Subsystem: the rest · Maintainer: Linus Torvalds

skb_dequeue() will return NULL for an empty list or a pointer
to the head element.

Signed-off-by: Arvind Yadav <redacted>
---
 drivers/isdn/hardware/avm/b1dma.c | 2 ++
 1 file changed, 2 insertions(+)
diff --git a/drivers/isdn/hardware/avm/b1dma.c b/drivers/isdn/hardware/avm/b1dma.c
index 9538a9e..10df578 100644
--- a/drivers/isdn/hardware/avm/b1dma.c
+++ b/drivers/isdn/hardware/avm/b1dma.c
@@ -375,6 +375,8 @@ static void b1dma_dispatch_tx(avmcard *card)
 	void *p;
 
 	skb = skb_dequeue(&dma->send_queue);
+	if (!skb)
+		return;
 
 	len = CAPIMSG_LEN(skb->data);
 
-- 
2.7.4
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help