Commit 43bd3834 authored by David S. Miller's avatar David S. Miller

VLAN dev: Fix hard_start_xmit return values.

parent 1c9077c8
...@@ -458,14 +458,14 @@ int vlan_dev_hard_start_xmit(struct sk_buff *skb, struct net_device *dev) ...@@ -458,14 +458,14 @@ int vlan_dev_hard_start_xmit(struct sk_buff *skb, struct net_device *dev)
kfree_skb(sk_tmp); kfree_skb(sk_tmp);
if (skb == NULL) { if (skb == NULL) {
stats->tx_dropped++; stats->tx_dropped++;
return -ENOMEM; return 0;
} }
VLAN_DEV_INFO(dev)->cnt_inc_headroom_on_tx++; VLAN_DEV_INFO(dev)->cnt_inc_headroom_on_tx++;
} else { } else {
if (!(skb = skb_unshare(skb, GFP_ATOMIC))) { if (!(skb = skb_unshare(skb, GFP_ATOMIC))) {
printk(KERN_ERR "vlan: failed to unshare skbuff\n"); printk(KERN_ERR "vlan: failed to unshare skbuff\n");
stats->tx_dropped++; stats->tx_dropped++;
return -ENOMEM; return 0;
} }
} }
veth = (struct vlan_ethhdr *)skb_push(skb, VLAN_HLEN); veth = (struct vlan_ethhdr *)skb_push(skb, VLAN_HLEN);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment