Re: [PATCH net v2] net: dsa: Unregister slave_dev in error path

2016-02-17 Thread David Miller
From: Florian Fainelli Date: Wed, 17 Feb 2016 18:43:22 -0800 > With commit 0071f56e46da ("dsa: Register netdev before phy"), we are now > trying > to free a network device that has been previously registered, and in case of > errors, this will make us hit the BUG_ON(dev->reg_state != > NETREG_U

[PATCH net v2] net: dsa: Unregister slave_dev in error path

2016-02-17 Thread Florian Fainelli
With commit 0071f56e46da ("dsa: Register netdev before phy"), we are now trying to free a network device that has been previously registered, and in case of errors, this will make us hit the BUG_ON(dev->reg_state != NETREG_UNREGISTERED) condition. Fix this by adding a missing unregister_netdev() b