summaryrefslogtreecommitdiffstats
path: root/net/atm/clip.c
diff options
context:
space:
mode:
authorJorge Boncompte [DTI2] <jorge@dti2.net>2011-11-21 10:25:56 +0000
committerDavid S. Miller <davem@davemloft.net>2011-11-22 16:15:34 -0500
commit3b829366cc6d0adeb4df2c2d917926f6b41c573d (patch)
treebe99f35ab02c024fbb777644a0582ce25f35fc93 /net/atm/clip.c
parentada22aa563c5932242d9684e01a3f51b7ea08801 (diff)
downloadlinux-3b829366cc6d0adeb4df2c2d917926f6b41c573d.tar.bz2
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>
Diffstat (limited to 'net/atm/clip.c')
-rw-r--r--net/atm/clip.c17
1 files changed, 10 insertions, 7 deletions
diff --git a/net/atm/clip.c b/net/atm/clip.c
index b3ab7ddc1185..e2de7c548b3a 100644
--- a/net/atm/clip.c
+++ b/net/atm/clip.c
@@ -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;
}