Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Jorge Boncompte [DTI2] and committed by
David S. Miller
3b829366 ada22aa5

+10 -7
+10 -7
net/atm/clip.c
··· 189 189 struct clip_vcc *clip_vcc = CLIP_VCC(vcc); 190 190 191 191 pr_debug("\n"); 192 + 193 + if (!clip_devs) { 194 + atm_return(vcc, skb->truesize); 195 + kfree_skb(skb); 196 + return; 197 + } 198 + 192 199 if (!skb) { 193 200 pr_debug("removing VCC %p\n", clip_vcc); 194 201 if (clip_vcc->entry) ··· 487 480 spin_unlock_irqrestore(&rq->lock, flags); 488 481 489 482 /* re-process everything received between connection setup and MKIP */ 490 - skb_queue_walk_safe(&queue, skb, tmp) { 491 - if (!clip_devs) { 492 - atm_return(vcc, skb->truesize); 493 - kfree_skb(skb); 494 - } else 495 - clip_push(vcc, skb); 496 - } 483 + skb_queue_walk_safe(&queue, skb, tmp) 484 + clip_push(vcc, skb); 485 + 497 486 return 0; 498 487 } 499 488