Patchwork [1/4] f_phonet: dev_kfree_skb instead of dev_kfree_skb_any in TX callback

login
register
mail settings
Submitter Rémi Denis-Courmont
Date April 6, 2009, 3:02 p.m.
Message ID <1239030177-28783-1-git-send-email-remi.denis-courmont@nokia.com>
Download mbox | patch
Permalink /patch/25642/
State Not Applicable
Delegated to: David Miller
Headers show

Comments

Rémi Denis-Courmont - April 6, 2009, 3:02 p.m.
From: Rémi Denis-Courmont <remi.denis-courmont@nokia.com>

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>
---
 drivers/usb/gadget/f_phonet.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

Patch

diff --git a/drivers/usb/gadget/f_phonet.c b/drivers/usb/gadget/f_phonet.c
index c1abeb8..54451ee 100644
--- a/drivers/usb/gadget/f_phonet.c
+++ b/drivers/usb/gadget/f_phonet.c
@@ -255,7 +255,7 @@  out_unlock:
 	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;