skb_dequeue() will return NULL for an empty list or a pointer
to the head element.
Signed-off-by: Arvind Yadav <[email protected]>
---
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
From: Arvind Yadav <[email protected]>
Date: Sun, 17 Dec 2017 01:17:23 +0530
> skb_dequeue() will return NULL for an empty list or a pointer
> to the head element.
>
> Signed-off-by: Arvind Yadav <[email protected]>
There is no code path where this is possible.
The two call sites:
1) Explicitly add an SKB to the queue
OR
2) Explcitily guard the call with an skb_queue_empty() check
Therefore the stated condition is not possible.