aboutsummaryrefslogtreecommitdiffstats
path: root/net/caif
diff options
context:
space:
mode:
authorsjur.brandeland@stericsson.com <sjur.brandeland@stericsson.com>2012-01-16 22:03:14 -0500
committerDavid S. Miller <davem@davemloft.net>2012-01-17 10:46:55 -0500
commit59f608d84f937cb5e2fd3a0b9f848f200d47ba85 (patch)
tree1f2e58895a410e494c910176f401cea24dabff7d /net/caif
parent3371bb3f7ed11b7b7473a202e2713bde50dc01c0 (diff)
caif: Remove bad WARN_ON in caif_dev
Remove WARN_ON and bad handling of SKB without destructor callback in caif_flow_cb. SKB without destructor cannot be handled as an error case. Signed-off-by: Sjur Brændeland <sjur.brandeland@stericsson.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/caif')
-rw-r--r--net/caif/caif_dev.c16
1 files changed, 9 insertions, 7 deletions
diff --git a/net/caif/caif_dev.c b/net/caif/caif_dev.c
index 61570ee76fe6..673728add60b 100644
--- a/net/caif/caif_dev.c
+++ b/net/caif/caif_dev.c
@@ -146,15 +146,17 @@ void caif_flow_cb(struct sk_buff *skb)
146 spin_lock_bh(&caifd->flow_lock); 146 spin_lock_bh(&caifd->flow_lock);
147 send_xoff = caifd->xoff; 147 send_xoff = caifd->xoff;
148 caifd->xoff = 0; 148 caifd->xoff = 0;
149 if (!WARN_ON(caifd->xoff_skb_dtor == NULL)) { 149 dtor = caifd->xoff_skb_dtor;
150 WARN_ON(caifd->xoff_skb != skb); 150
151 dtor = caifd->xoff_skb_dtor; 151 if (WARN_ON(caifd->xoff_skb != skb))
152 caifd->xoff_skb = NULL; 152 skb = NULL;
153 caifd->xoff_skb_dtor = NULL; 153
154 } 154 caifd->xoff_skb = NULL;
155 caifd->xoff_skb_dtor = NULL;
156
155 spin_unlock_bh(&caifd->flow_lock); 157 spin_unlock_bh(&caifd->flow_lock);
156 158
157 if (dtor) 159 if (dtor && skb)
158 dtor(skb); 160 dtor(skb);
159 161
160 if (send_xoff) 162 if (send_xoff)