Skip to contentSkip to conversation

net: ethernet: arc: add the missed clk_disable_unprepare

PATCH Applied Chuhong Yuan 2 participants 2 messages Nov 1, 2019

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 net: ethernet: arc: add the missed clk_disable_unprepare

The remove misses to disable and unprepare priv->macclk like what is done when probe fails.
Add the missed call in remove.

---
 drivers/net/ethernet/arc/emac_rockchip.c | 3 +++
 1 file changed, 3 insertions(+)
drivers/net/ethernet/arc/emac_rockchip.c +3 -0
index 42d2e1b02c44..664d664e0925 100644
@@ -256,6 +256,9 @@ static int emac_rockchip_remove(struct platform_device *pdev)
 	if (priv->regulator)
 		regulator_disable(priv->regulator);
 
+	if (priv->soc_data->need_div_macclk)
+		clk_disable_unprepare(priv->macclk);
+
 	free_netdev(ndev);
 	return err;
 }
Signature · 1 line
2.23.0