diff options
author | Jorge Boncompte [DTI2] <jorge@dti2.net> | 2011-11-21 05:25:56 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2011-11-22 16:15:34 -0500 |
commit | 3b829366cc6d0adeb4df2c2d917926f6b41c573d (patch) | |
tree | be99f35ab02c024fbb777644a0582ce25f35fc93 /net/atm | |
parent | ada22aa563c5932242d9684e01a3f51b7ea08801 (diff) |
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')
-rw-r--r-- | net/atm/clip.c | 17 |
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) | |||
189 | struct clip_vcc *clip_vcc = CLIP_VCC(vcc); | 189 | struct clip_vcc *clip_vcc = CLIP_VCC(vcc); |
190 | 190 | ||
191 | pr_debug("\n"); | 191 | pr_debug("\n"); |
192 | |||
193 | if (!clip_devs) { | ||
194 | atm_return(vcc, skb->truesize); | ||
195 | kfree_skb(skb); | ||
196 | return; | ||
197 | } | ||
198 | |||
192 | if (!skb) { | 199 | if (!skb) { |
193 | pr_debug("removing VCC %p\n", clip_vcc); | 200 | pr_debug("removing VCC %p\n", clip_vcc); |
194 | if (clip_vcc->entry) | 201 | if (clip_vcc->entry) |
@@ -480,13 +487,9 @@ static int clip_mkip(struct atm_vcc *vcc, int timeout) | |||
480 | spin_unlock_irqrestore(&rq->lock, flags); | 487 | spin_unlock_irqrestore(&rq->lock, flags); |
481 | 488 | ||
482 | /* re-process everything received between connection setup and MKIP */ | 489 | /* re-process everything received between connection setup and MKIP */ |
483 | skb_queue_walk_safe(&queue, skb, tmp) { | 490 | skb_queue_walk_safe(&queue, skb, tmp) |
484 | if (!clip_devs) { | 491 | clip_push(vcc, skb); |
485 | atm_return(vcc, skb->truesize); | 492 | |
486 | kfree_skb(skb); | ||
487 | } else | ||
488 | clip_push(vcc, skb); | ||
489 | } | ||
490 | return 0; | 493 | return 0; |
491 | } | 494 | } |
492 | 495 | ||