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>
This commit is contained in:
parent
3371bb3f7e
commit
59f608d84f
@ -146,15 +146,17 @@ void caif_flow_cb(struct sk_buff *skb)
|
|||||||
spin_lock_bh(&caifd->flow_lock);
|
spin_lock_bh(&caifd->flow_lock);
|
||||||
send_xoff = caifd->xoff;
|
send_xoff = caifd->xoff;
|
||||||
caifd->xoff = 0;
|
caifd->xoff = 0;
|
||||||
if (!WARN_ON(caifd->xoff_skb_dtor == NULL)) {
|
dtor = caifd->xoff_skb_dtor;
|
||||||
WARN_ON(caifd->xoff_skb != skb);
|
|
||||||
dtor = caifd->xoff_skb_dtor;
|
if (WARN_ON(caifd->xoff_skb != skb))
|
||||||
caifd->xoff_skb = NULL;
|
skb = NULL;
|
||||||
caifd->xoff_skb_dtor = NULL;
|
|
||||||
}
|
caifd->xoff_skb = NULL;
|
||||||
|
caifd->xoff_skb_dtor = NULL;
|
||||||
|
|
||||||
spin_unlock_bh(&caifd->flow_lock);
|
spin_unlock_bh(&caifd->flow_lock);
|
||||||
|
|
||||||
if (dtor)
|
if (dtor && skb)
|
||||||
dtor(skb);
|
dtor(skb);
|
||||||
|
|
||||||
if (send_xoff)
|
if (send_xoff)
|
||||||
|
Loading…
Reference in New Issue
Block a user