mirror of
https://github.com/torvalds/linux.git
synced 2024-12-26 21:02:19 +00:00
be2net: take care of __vlan_put_tag return value
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>
This commit is contained in:
parent
d900d12052
commit
f11a869d4e
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user