dect
/
linux-2.6
Archived
13
0
Fork 0

atm: clip: move clip_devs check to clip_push

This will allow further cleanup.

Signed-off-by: Jorge Boncompte [DTI2] <jorge@dti2.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
Jorge Boncompte [DTI2] 2011-11-21 10:25:56 +00:00 committed by David S. Miller
parent ada22aa563
commit 3b829366cc
1 changed files with 10 additions and 7 deletions

View File

@ -189,6 +189,13 @@ static void clip_push(struct atm_vcc *vcc, struct sk_buff *skb)
struct clip_vcc *clip_vcc = CLIP_VCC(vcc);
pr_debug("\n");
if (!clip_devs) {
atm_return(vcc, skb->truesize);
kfree_skb(skb);
return;
}
if (!skb) {
pr_debug("removing VCC %p\n", clip_vcc);
if (clip_vcc->entry)
@ -480,13 +487,9 @@ static int clip_mkip(struct atm_vcc *vcc, int timeout)
spin_unlock_irqrestore(&rq->lock, flags);
/* re-process everything received between connection setup and MKIP */
skb_queue_walk_safe(&queue, skb, tmp) {
if (!clip_devs) {
atm_return(vcc, skb->truesize);
kfree_skb(skb);
} else
clip_push(vcc, skb);
}
skb_queue_walk_safe(&queue, skb, tmp)
clip_push(vcc, skb);
return 0;
}