aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPatrick McHardy <kaber@trash.net>2009-06-12 05:20:01 +0000
committerDavid S. Miller <davem@davemloft.net>2009-06-13 01:18:42 -0700
commit98ca4a46d27348476c9196ebc0a0c5297431d90f (patch)
tree6e3e590e2e10b3e0ec62a37c2a56f0704d202827
parentae71bafdd4ce29856addfede1ab7046f4e45775b (diff)
downloadlinux-2.6.34-ux500-98ca4a46d27348476c9196ebc0a0c5297431d90f.tar.gz
net: fix network drivers ndo_start_xmit() return values (part 6)
Fix up hamradio drivers that return an errno value to dev_queue_xmit(), causing it to print a warning an free the skb. - bpqether: skb is freed: use after free Compile tested only. Signed-off-by: Patrick McHardy <kaber@trash.net> Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r--drivers/net/hamradio/bpqether.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/net/hamradio/bpqether.c b/drivers/net/hamradio/bpqether.c
index d509b371a56..5105548ad50 100644
--- a/drivers/net/hamradio/bpqether.c
+++ b/drivers/net/hamradio/bpqether.c
@@ -274,7 +274,7 @@ static int bpq_xmit(struct sk_buff *skb, struct net_device *dev)
if ((newskb = skb_realloc_headroom(skb, AX25_BPQ_HEADER_LEN)) == NULL) {
printk(KERN_WARNING "bpqether: out of memory\n");
kfree_skb(skb);
- return -ENOMEM;
+ return NETDEV_TX_OK;
}
if (skb->sk != NULL)
@@ -294,7 +294,7 @@ static int bpq_xmit(struct sk_buff *skb, struct net_device *dev)
if ((dev = bpq_get_ether_dev(dev)) == NULL) {
dev->stats.tx_dropped++;
kfree_skb(skb);
- return -ENODEV;
+ return NETDEV_TX_OK;
}
skb->protocol = ax25_type_trans(skb, dev);