2
0

001-4.15-12-bcm63xx_enet-drop-unneeded-NULL-phy_clk-check.patch 1.1 KB

123456789101112131415161718192021222324252627282930313233343536
  1. From 555baec974ede81e616ca88ac6d3fca09239368f Mon Sep 17 00:00:00 2001
  2. From: Jonas Gorski <[email protected]>
  3. Date: Tue, 18 Jul 2017 13:18:01 +0200
  4. Subject: [PATCH 5/6] bcm63xx_enet: drop unneeded NULL phy_clk check
  5. clk_disable and clk_unprepare are NULL-safe, so need to duplicate the
  6. NULL check of the functions.
  7. Signed-off-by: Jonas Gorski <[email protected]>
  8. ---
  9. drivers/net/ethernet/broadcom/bcm63xx_enet.c | 7 ++-----
  10. 1 file changed, 2 insertions(+), 5 deletions(-)
  11. --- a/drivers/net/ethernet/broadcom/bcm63xx_enet.c
  12. +++ b/drivers/net/ethernet/broadcom/bcm63xx_enet.c
  13. @@ -1918,8 +1918,7 @@ out_free_mdio:
  14. out_uninit_hw:
  15. /* turn off mdc clock */
  16. enet_writel(priv, 0, ENET_MIISC_REG);
  17. - if (priv->phy_clk)
  18. - clk_disable_unprepare(priv->phy_clk);
  19. + clk_disable_unprepare(priv->phy_clk);
  20. out_disable_clk_mac:
  21. clk_disable_unprepare(priv->mac_clk);
  22. @@ -1958,9 +1957,7 @@ static int bcm_enet_remove(struct platfo
  23. }
  24. /* disable hw block clocks */
  25. - if (priv->phy_clk)
  26. - clk_disable_unprepare(priv->phy_clk);
  27. -
  28. + clk_disable_unprepare(priv->phy_clk);
  29. clk_disable_unprepare(priv->mac_clk);
  30. free_netdev(dev);