net: ethernet: arc: add the missed clk_disable_unprepare
authorChuhong Yuan <hslester96@gmail.com>
Fri, 1 Nov 2019 12:17:25 +0000 (20:17 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 12 Nov 2019 18:16:06 +0000 (19:16 +0100)
[ Upstream commit 4202e219edd6cc164c042e16fa327525410705ae ]

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

Signed-off-by: Chuhong Yuan <hslester96@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/net/ethernet/arc/emac_rockchip.c

index c770ca37c9b21eb77af38e404489653109aae711..a7d30731d376f15b73ff7b732691154f23aa03f6 100644 (file)
@@ -261,6 +261,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;
 }