[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <1365778164-16857-1-git-send-email-ivecera@redhat.com>
Date: Fri, 12 Apr 2013 16:49:24 +0200
From: Ivan Vecera <ivecera@...hat.com>
To: netdev@...r.kernel.org
Cc: sathya.perla@...lex.com, subbu.seetharaman@...lex.com,
ajit.khaparde@...lex.com
Subject: [net PATCH] 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@...hat.com>
---
drivers/net/ethernet/emulex/benet/be_main.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/drivers/net/ethernet/emulex/benet/be_main.c b/drivers/net/ethernet/emulex/benet/be_main.c
index 4d6f3c5..a4e4626 100644
--- a/drivers/net/ethernet/emulex/benet/be_main.c
+++ b/drivers/net/ethernet/emulex/benet/be_main.c
@@ -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;
--
1.8.1.5
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists