summaryrefslogtreecommitdiff
path: root/drivers/net/wan
diff options
context:
space:
mode:
authorPatrick McHardy <kaber@trash.net>2009-06-16 03:33:24 +0400
committerDavid S. Miller <davem@davemloft.net>2009-06-17 15:31:16 +0400
commitd77eeb702cba0fa6efaf5689fce8939aa617f410 (patch)
treea78a54d0f421364c17260d92ce7b240bfbaf6fd3 /drivers/net/wan
parent5dbc901172fb952409940cd7ca55d8e6e5a7cc2c (diff)
downloadlinux-d77eeb702cba0fa6efaf5689fce8939aa617f410.tar.xz
net: fix network drivers ndo_start_xmit() return values
Fix up remaining drivers returning a magic or an errno value from their ndo_start_xmit() functions that were missed in the first pass: - isdn_net: missed conversion - bpqether: missed conversion: skb is freed, so return NETDEV_TX_OK - hp100: intention appears to be to resubmit skb once resources are available, but due to no queue handling it is dropped for now. - lapbether: skb is freed, so return NETDEV_TX_OK Signed-off-by: Patrick McHardy <kaber@trash.net> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/wan')
-rw-r--r--drivers/net/wan/lapbether.c16
1 files changed, 5 insertions, 11 deletions
diff --git a/drivers/net/wan/lapbether.c b/drivers/net/wan/lapbether.c
index 2dd78d20eb05..aff4f6bdf3d5 100644
--- a/drivers/net/wan/lapbether.c
+++ b/drivers/net/wan/lapbether.c
@@ -149,46 +149,40 @@ static int lapbeth_data_indication(struct net_device *dev, struct sk_buff *skb)
*/
static int lapbeth_xmit(struct sk_buff *skb, struct net_device *dev)
{
- int err = -ENODEV;
+ int err;
/*
* Just to be *really* sure not to send anything if the interface
* is down, the ethernet device may have gone.
*/
- if (!netif_running(dev)) {
+ if (!netif_running(dev))
goto drop;
- }
switch (skb->data[0]) {
case 0x00:
- err = 0;
break;
case 0x01:
if ((err = lapb_connect_request(dev)) != LAPB_OK)
printk(KERN_ERR "lapbeth: lapb_connect_request "
"error: %d\n", err);
- goto drop_ok;
+ goto drop;
case 0x02:
if ((err = lapb_disconnect_request(dev)) != LAPB_OK)
printk(KERN_ERR "lapbeth: lapb_disconnect_request "
"err: %d\n", err);
/* Fall thru */
default:
- goto drop_ok;
+ goto drop;
}
skb_pull(skb, 1);
if ((err = lapb_data_request(dev, skb)) != LAPB_OK) {
printk(KERN_ERR "lapbeth: lapb_data_request error - %d\n", err);
- err = -ENOMEM;
goto drop;
}
- err = 0;
out:
- return err;
-drop_ok:
- err = 0;
+ return NETDEV_TX_OK;
drop:
kfree_skb(skb);
goto out;