Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit cf98192d authored by Romain Perier's avatar Romain Perier Committed by David S. Miller
Browse files

net: ethernet: arc: Don't free Rockchip resources before disconnect from phy



Free resources before being disconnected from phy and calling core driver is
wrong and should not happen. It avoids a delay of 4-5s caused by the timeout of
phy_disconnect().

Signed-off-by: default avatarRomain Perier <romain.perier@gmail.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 0aac3833
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -202,12 +202,13 @@ static int emac_rockchip_remove(struct platform_device *pdev)
	struct rockchip_priv_data *priv = netdev_priv(ndev);
	int err;

	err = arc_emac_remove(ndev);

	clk_disable_unprepare(priv->refclk);

	if (priv->regulator)
		regulator_disable(priv->regulator);

	err = arc_emac_remove(ndev);
	free_netdev(ndev);
	return err;
}