Skip to content

Commit 3b82936

Browse files
Jorge Boncompte [DTI2]davem330
authored andcommitted
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>
1 parent ada22aa commit 3b82936

1 file changed

Lines changed: 10 additions & 7 deletions

File tree

‎net/atm/clip.c‎

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -189,6 +189,13 @@ static void clip_push(struct atm_vcc *vcc, struct sk_buff *skb)
189189
struct clip_vcc *clip_vcc = CLIP_VCC(vcc);
190190

191191
pr_debug("\n");
192+
193+
if (!clip_devs) {
194+
atm_return(vcc, skb->truesize);
195+
kfree_skb(skb);
196+
return;
197+
}
198+
192199
if (!skb) {
193200
pr_debug("removing VCC %p\n", clip_vcc);
194201
if (clip_vcc->entry)
@@ -480,13 +487,9 @@ static int clip_mkip(struct atm_vcc *vcc, int timeout)
480487
spin_unlock_irqrestore(&rq->lock, flags);
481488

482489
/* re-process everything received between connection setup and MKIP */
483-
skb_queue_walk_safe(&queue, skb, tmp) {
484-
if (!clip_devs) {
485-
atm_return(vcc, skb->truesize);
486-
kfree_skb(skb);
487-
} else
488-
clip_push(vcc, skb);
489-
}
490+
skb_queue_walk_safe(&queue, skb, tmp)
491+
clip_push(vcc, skb);
492+
490493
return 0;
491494
}
492495

0 commit comments

Comments
 (0)