diff options
Diffstat (limited to 'net/caif/caif_dev.c')
-rw-r--r-- | net/caif/caif_dev.c | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/net/caif/caif_dev.c b/net/caif/caif_dev.c index 61570ee76fe..673728add60 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) |