diff options
| author | Dave Airlie <airlied@redhat.com> | 2018-01-18 09:32:15 +1000 |
|---|---|---|
| committer | Dave Airlie <airlied@redhat.com> | 2018-01-18 09:32:15 +1000 |
| commit | 4a6cc7a44e98a0460bd094b68c75f0705fdc450a (patch) | |
| tree | b8c86a1e0342b1166ab52c4d79e404eede57abec /drivers/net/phy/mdio-xgene.c | |
| parent | 8563188e37b000979ab66521f4337df9a3453223 (diff) | |
| parent | a8750ddca918032d6349adbf9a4b6555e7db20da (diff) | |
| download | talos-op-linux-4a6cc7a44e98a0460bd094b68c75f0705fdc450a.tar.gz talos-op-linux-4a6cc7a44e98a0460bd094b68c75f0705fdc450a.zip | |
BackMerge tag 'v4.15-rc8' into drm-next
Linux 4.15-rc8
Daniel requested this for so the intel CI won't fall over on drm-next
so often.
Diffstat (limited to 'drivers/net/phy/mdio-xgene.c')
| -rw-r--r-- | drivers/net/phy/mdio-xgene.c | 21 |
1 files changed, 15 insertions, 6 deletions
diff --git a/drivers/net/phy/mdio-xgene.c b/drivers/net/phy/mdio-xgene.c index bfd3090fb055..07c6048200c6 100644 --- a/drivers/net/phy/mdio-xgene.c +++ b/drivers/net/phy/mdio-xgene.c @@ -194,8 +194,11 @@ static int xgene_mdio_reset(struct xgene_mdio_pdata *pdata) } ret = xgene_enet_ecc_init(pdata); - if (ret) + if (ret) { + if (pdata->dev->of_node) + clk_disable_unprepare(pdata->clk); return ret; + } xgene_gmac_reset(pdata); return 0; @@ -388,8 +391,10 @@ static int xgene_mdio_probe(struct platform_device *pdev) return ret; mdio_bus = mdiobus_alloc(); - if (!mdio_bus) - return -ENOMEM; + if (!mdio_bus) { + ret = -ENOMEM; + goto out_clk; + } mdio_bus->name = "APM X-Gene MDIO bus"; @@ -418,7 +423,7 @@ static int xgene_mdio_probe(struct platform_device *pdev) mdio_bus->phy_mask = ~0; ret = mdiobus_register(mdio_bus); if (ret) - goto out; + goto out_mdiobus; acpi_walk_namespace(ACPI_TYPE_DEVICE, ACPI_HANDLE(dev), 1, acpi_register_phy, NULL, mdio_bus, NULL); @@ -426,16 +431,20 @@ static int xgene_mdio_probe(struct platform_device *pdev) } if (ret) - goto out; + goto out_mdiobus; pdata->mdio_bus = mdio_bus; xgene_mdio_status = true; return 0; -out: +out_mdiobus: mdiobus_free(mdio_bus); +out_clk: + if (dev->of_node) + clk_disable_unprepare(pdata->clk); + return ret; } |

