[PATCH] isdn: avm: Handle return value of skb_dequeue()
From: Arvind Yadav
Date: Sat Dec 16 2017 - 14:47:43 EST
skb_dequeue() will return NULL for an empty list or a pointer
to the head element.
Signed-off-by: Arvind Yadav <arvind.yadav.cs@xxxxxxxxx>
---
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