Commit 3b829366 authored by Jorge Boncompte [DTI2]'s avatar Jorge Boncompte [DTI2] Committed by David S. Miller

atm: clip: move clip_devs check to clip_push

This will allow further cleanup.
Signed-off-by: default avatarJorge Boncompte [DTI2] <jorge@dti2.net>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent ada22aa5
...@@ -189,6 +189,13 @@ static void clip_push(struct atm_vcc *vcc, struct sk_buff *skb) ...@@ -189,6 +189,13 @@ static void clip_push(struct atm_vcc *vcc, struct sk_buff *skb)
struct clip_vcc *clip_vcc = CLIP_VCC(vcc); struct clip_vcc *clip_vcc = CLIP_VCC(vcc);
pr_debug("\n"); pr_debug("\n");
if (!clip_devs) {
atm_return(vcc, skb->truesize);
kfree_skb(skb);
return;
}
if (!skb) { if (!skb) {
pr_debug("removing VCC %p\n", clip_vcc); pr_debug("removing VCC %p\n", clip_vcc);
if (clip_vcc->entry) if (clip_vcc->entry)
...@@ -480,13 +487,9 @@ static int clip_mkip(struct atm_vcc *vcc, int timeout) ...@@ -480,13 +487,9 @@ static int clip_mkip(struct atm_vcc *vcc, int timeout)
spin_unlock_irqrestore(&rq->lock, flags); spin_unlock_irqrestore(&rq->lock, flags);
/* re-process everything received between connection setup and MKIP */ /* re-process everything received between connection setup and MKIP */
skb_queue_walk_safe(&queue, skb, tmp) { skb_queue_walk_safe(&queue, skb, tmp)
if (!clip_devs) { clip_push(vcc, skb);
atm_return(vcc, skb->truesize);
kfree_skb(skb);
} else
clip_push(vcc, skb);
}
return 0; return 0;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment