dsa: fix promiscuity leak on slave dev open error

DSA master netdev promiscuity counter was not being properly
decremented on slave device open error path.

Signed-off-by: Gilad Ben-Yossef <gilad@benyossef.com>
CC: Gilad Ben-Yossef <giladb@ezchip.com>
CC: David S. Miller <davem@davemloft.net>
CC: Florian Fainelli <f.fainelli@gmail.com>
CC: Guenter Roeck <linux@roeck-us.net>
CC: Andrew Lunn <andrew@lunn.ch>
CC: Scott Feldman <sfeldma@gmail.com>
Acked-by: Andrew Lunn <andrew@lunn.ch>
Acked-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
Gilad Ben-Yossef 2015-06-25 16:50:13 +03:00 committed by David S. Miller
parent 14e28b1d3c
commit 4fdeddfe04

View File

@ -112,7 +112,7 @@ static int dsa_slave_open(struct net_device *dev)
clear_promisc: clear_promisc:
if (dev->flags & IFF_PROMISC) if (dev->flags & IFF_PROMISC)
dev_set_promiscuity(master, 0); dev_set_promiscuity(master, -1);
clear_allmulti: clear_allmulti:
if (dev->flags & IFF_ALLMULTI) if (dev->flags & IFF_ALLMULTI)
dev_set_allmulti(master, -1); dev_set_allmulti(master, -1);