-@@ -2266,7 +2280,7 @@ static int b44_register_phy_one(struct b
- if (err < 0) {
- dev_err(sdev->dev, "could not attach PHY at %i\n",
- bp->phy_addr);
-- goto err_out_mdiobus_unregister;
-+ goto err_out_phy_free;
- }
-
- /* mask with MAC supported features */
-@@ -2288,6 +2302,9 @@ static int b44_register_phy_one(struct b
-
- return 0;
-
-+err_out_phy_free:
-+ if (phydev && dummy_phy)
-+ phy_device_free(phydev);
- err_out_mdiobus_unregister:
- mdiobus_unregister(mii_bus);
-