be2net: Fix be_vlan_rem_vid() to check vlan id being removed
authorSriharsha Basavapatna <sriharsha.basavapatna@broadcom.com>
Wed, 3 Feb 2016 04:19:18 +0000 (09:49 +0530)
committerDavid S. Miller <davem@davemloft.net>
Sun, 7 Feb 2016 18:55:22 +0000 (13:55 -0500)
commit41dcdfbd0944a3ef08224a8c9ba3b2fdeae0dd86
tree3863ee1935b31e76bced7a894139319cf5d9b32b
parentfa5c867d4df275a2c11a455043848574e80a8b32
be2net: Fix be_vlan_rem_vid() to check vlan id being removed

The driver decrements its vlan count without checking if it is really
present in its list. This results in an invalid vlan count and impacts
subsequent vlan add/rem ops. The function be_vlan_rem_vid() should be
updated to fix this.

Signed-off-by: Sriharsha Basavapatna <sriharsha.basavapatna@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/emulex/benet/be_main.c