summaryrefslogtreecommitdiffstats
path: root/drivers/net/irda/kingsun-sir.c
diff options
context:
space:
mode:
authorPatrick McHardy <kaber@trash.net>2009-06-12 03:17:19 +0000
committerDavid S. Miller <davem@davemloft.net>2009-06-13 01:18:34 -0700
commit4bd73ae2682d9069746bb049a416d9ab90c6684b (patch)
tree06c1fa545e0fe2ee1e610db19fde49114b47f152 /drivers/net/irda/kingsun-sir.c
parent3790c8cdb99f23824b23cb16df608281b335ee91 (diff)
downloadlinux-4bd73ae2682d9069746bb049a416d9ab90c6684b.tar.bz2
net: fix network drivers ndo_start_xmit() return values (part 2)
Fix up IRDA drivers that return an errno value to qdisc_restart(), causing qdisc_restart() to print a warning an requeue/retransmit the skb. - donauboe: intention appears to be to have the skb retransmitted without error message - irda-usb: intention is to drop silently according to comment - kingsub-sir: skb is freed: use after free - ks959-sir: skb is freed: use after free - ksdazzle-sir: skb is freed: use after free - mcs7880: skb is freed: use after free All but donauboe compile tested. Signed-off-by: Patrick McHardy <kaber@trash.net> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/irda/kingsun-sir.c')
-rw-r--r--drivers/net/irda/kingsun-sir.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/drivers/net/irda/kingsun-sir.c b/drivers/net/irda/kingsun-sir.c
index 9d813bc4502e..c3e4e2c435ba 100644
--- a/drivers/net/irda/kingsun-sir.c
+++ b/drivers/net/irda/kingsun-sir.c
@@ -156,9 +156,6 @@ static int kingsun_hard_xmit(struct sk_buff *skb, struct net_device *netdev)
int wraplen;
int ret = 0;
- if (skb == NULL || netdev == NULL)
- return -EINVAL;
-
netif_stop_queue(netdev);
/* the IRDA wrapping routines don't deal with non linear skb */
@@ -197,7 +194,7 @@ static int kingsun_hard_xmit(struct sk_buff *skb, struct net_device *netdev)
dev_kfree_skb(skb);
spin_unlock(&kingsun->lock);
- return ret;
+ return NETDEV_TX_OK;
}
/* Receive callback function */