Skip to content

Commit

Permalink
f_phonet: dev_kfree_skb instead of dev_kfree_skb_any in TX callback
Browse files Browse the repository at this point in the history
Network device TX is never run in IRQ context, and skb is freed outside
of the IRQ-disabling spin lock. So checking for IRQ was a waste of time
here.

Signed-off-by: Rémi Denis-Courmont <remi.denis-courmont@nokia.com>
Signed-off-by: Felipe Balbi <felipe.balbi@nokia.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Rémi Denis-Courmont authored and David S. Miller committed Jun 2, 2009
1 parent bbd5898 commit fa20259
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/usb/gadget/f_phonet.c
Original file line number Diff line number Diff line change
Expand Up @@ -255,7 +255,7 @@ static int pn_net_xmit(struct sk_buff *skb, struct net_device *dev)
spin_unlock_irqrestore(&port->lock, flags);
out:
if (unlikely(skb)) {
dev_kfree_skb_any(skb);
dev_kfree_skb(skb);
dev->stats.tx_dropped++;
}
return 0;
Expand Down

0 comments on commit fa20259

Please sign in to comment.