Commit 4e78e5c5 authored by Jonas Gorski's avatar Jonas Gorski Committed by David S. Miller

bcm63xx_enet: drop unneeded NULL phy_clk check

clk_disable and clk_unprepare are NULL-safe, so need to duplicate the
NULL check of the functions.
Signed-off-by: default avatarJonas Gorski <jonas.gorski@gmail.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 7e697ce9
...@@ -1903,8 +1903,7 @@ static int bcm_enet_probe(struct platform_device *pdev) ...@@ -1903,8 +1903,7 @@ static int bcm_enet_probe(struct platform_device *pdev)
out_uninit_hw: out_uninit_hw:
/* turn off mdc clock */ /* turn off mdc clock */
enet_writel(priv, 0, ENET_MIISC_REG); enet_writel(priv, 0, ENET_MIISC_REG);
if (priv->phy_clk) clk_disable_unprepare(priv->phy_clk);
clk_disable_unprepare(priv->phy_clk);
out_disable_clk_mac: out_disable_clk_mac:
clk_disable_unprepare(priv->mac_clk); clk_disable_unprepare(priv->mac_clk);
...@@ -1943,9 +1942,7 @@ static int bcm_enet_remove(struct platform_device *pdev) ...@@ -1943,9 +1942,7 @@ static int bcm_enet_remove(struct platform_device *pdev)
} }
/* disable hw block clocks */ /* disable hw block clocks */
if (priv->phy_clk) clk_disable_unprepare(priv->phy_clk);
clk_disable_unprepare(priv->phy_clk);
clk_disable_unprepare(priv->mac_clk); clk_disable_unprepare(priv->mac_clk);
free_netdev(dev); free_netdev(dev);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment