Skip to content

Commit

Permalink
be2net: take care of __vlan_put_tag return value
Browse files Browse the repository at this point in the history
The driver should use return value of __vlan_put_tag with appropriate
NULL-check instead of old skb pointer.

Signed-off-by: Ivan Vecera <ivecera@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Ivan Vecera authored and David S. Miller committed Apr 12, 2013
1 parent d900d12 commit f11a869
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions drivers/net/ethernet/emulex/benet/be_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -759,8 +759,9 @@ static struct sk_buff *be_insert_vlan_in_pkt(struct be_adapter *adapter,

if (vlan_tx_tag_present(skb)) {
vlan_tag = be_get_tx_vlan_tag(adapter, skb);
__vlan_put_tag(skb, vlan_tag);
skb->vlan_tci = 0;
skb = __vlan_put_tag(skb, vlan_tag);
if (skb)
skb->vlan_tci = 0;
}

return skb;
Expand Down

0 comments on commit f11a869

Please sign in to comment.