mirror of
https://github.com/torvalds/linux.git
synced 2026-11-23 23:11:40 +00:00
With commit0071f56e46("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() before free_netdev(). Fixes:0071f56e46("dsa: Register netdev before phy") Signed-off-by: Florian Fainelli <[email protected]> Signed-off-by: David S. Miller <[email protected]>