]> git.baikalelectronics.ru Git - kernel.git/commit
net: dsa: bcm_sf2: Unwind errors in correct order
authorFlorian Fainelli <f.fainelli@gmail.com>
Fri, 29 Jul 2016 19:35:57 +0000 (12:35 -0700)
committerDavid S. Miller <davem@davemloft.net>
Sun, 31 Jul 2016 06:14:52 +0000 (23:14 -0700)
commit3b143b0ccab3768911316090e7f2d70134a109d7
tree7c3f187452ad65bd4244b56dcc3755e27cf72233
parent108b3e48180cea0f2b8a2f99d0de1a82bf476278
net: dsa: bcm_sf2: Unwind errors in correct order

In case we cannot complete bcm_sf2_sw_setup() for any reason, and we
go to the out_unmap label, but the MDIO bus has not been registered yet,
we will hit the BUG condition in drivers/net/phy/mdio_bus.c about the
bus not being registered. Fix this by dedicating a specific lable for
when we fail after the MDIO bus has been successfully registered.

Fixes: 1d2c524a6dde ("net: dsa: bcm_sf2: Register our slave MDIO bus")
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
Reviewed-by: Vivien Didelot <vivien.didelot@savoirfairelinux.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/dsa/bcm_sf2.c