summaryrefslogtreecommitdiffstats
path: root/drivers/staging
diff options
context:
space:
mode:
authorPatrick McHardy <kaber@trash.net>2009-06-12 06:14:36 +0000
committerDavid S. Miller <davem@davemloft.net>2009-06-13 01:18:45 -0700
commit5b2c4b972c0226406361f83b747eb5cdab51e68e (patch)
treeb915055947fc6646af3477b135be4ad76ec4ba32 /drivers/staging
parent81fbbf60408ad6b98ff72120de948cb7fd2498d0 (diff)
downloadtalos-obmc-linux-5b2c4b972c0226406361f83b747eb5cdab51e68e.tar.gz
talos-obmc-linux-5b2c4b972c0226406361f83b747eb5cdab51e68e.zip
net: fix network drivers ndo_start_xmit() return values (part 8)
Fix up USB drivers that return an errno value (result of usb_submit_urb()) to qdisc_restart(), causing qdisc_restart() to print a warning and requeue/ retransmit the skb. - hso: skb is freed: use after free - at76_usb: 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>
Diffstat (limited to 'drivers/staging')
-rw-r--r--drivers/staging/at76_usb/at76_usb.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/drivers/staging/at76_usb/at76_usb.c b/drivers/staging/at76_usb/at76_usb.c
index c8af9a868d62..3f303ae97b43 100644
--- a/drivers/staging/at76_usb/at76_usb.c
+++ b/drivers/staging/at76_usb/at76_usb.c
@@ -3242,12 +3242,11 @@ static int at76_tx(struct sk_buff *skb, struct net_device *netdev)
"%s: -EINVAL: tx urb %p hcpriv %p complete %p\n",
priv->netdev->name, priv->tx_urb,
priv->tx_urb->hcpriv, priv->tx_urb->complete);
- } else {
+ } else
stats->tx_bytes += skb->len;
- dev_kfree_skb(skb);
- }
- return ret;
+ dev_kfree_skb(skb);
+ return NETDEV_TX_OK;
}
static void at76_tx_timeout(struct net_device *netdev)
OpenPOWER on IntegriCloud