Commit 20d5e0ef authored by Uwe Kleine-König's avatar Uwe Kleine-König Committed by David S. Miller

net: arc: Make arc_emac_remove() return void

The function returns zero unconditionally. Change it to return void instead
which simplifies its callers as error handing becomes unnecessary.
Signed-off-by: default avatarUwe Kleine-König <u.kleine-koenig@pengutronix.de>
Reviewed-by: default avatarSimon Horman <simon.horman@corigine.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 640c48a0
......@@ -220,6 +220,6 @@ static inline void arc_reg_clr(struct arc_emac_priv *priv, int reg, int mask)
int arc_mdio_probe(struct arc_emac_priv *priv);
int arc_mdio_remove(struct arc_emac_priv *priv);
int arc_emac_probe(struct net_device *ndev, int interface);
int arc_emac_remove(struct net_device *ndev);
void arc_emac_remove(struct net_device *ndev);
#endif /* ARC_EMAC_H */
......@@ -61,11 +61,11 @@ static int emac_arc_probe(struct platform_device *pdev)
static int emac_arc_remove(struct platform_device *pdev)
{
struct net_device *ndev = platform_get_drvdata(pdev);
int err;
err = arc_emac_remove(ndev);
arc_emac_remove(ndev);
free_netdev(ndev);
return err;
return 0;
}
static const struct of_device_id emac_arc_dt_ids[] = {
......
......@@ -1008,7 +1008,7 @@ int arc_emac_probe(struct net_device *ndev, int interface)
}
EXPORT_SYMBOL_GPL(arc_emac_probe);
int arc_emac_remove(struct net_device *ndev)
void arc_emac_remove(struct net_device *ndev)
{
struct arc_emac_priv *priv = netdev_priv(ndev);
......@@ -1019,8 +1019,6 @@ int arc_emac_remove(struct net_device *ndev)
if (!IS_ERR(priv->clk))
clk_disable_unprepare(priv->clk);
return 0;
}
EXPORT_SYMBOL_GPL(arc_emac_remove);
......
......@@ -248,9 +248,8 @@ static int emac_rockchip_remove(struct platform_device *pdev)
{
struct net_device *ndev = platform_get_drvdata(pdev);
struct rockchip_priv_data *priv = netdev_priv(ndev);
int err;
err = arc_emac_remove(ndev);
arc_emac_remove(ndev);
clk_disable_unprepare(priv->refclk);
......@@ -261,7 +260,7 @@ static int emac_rockchip_remove(struct platform_device *pdev)
clk_disable_unprepare(priv->macclk);
free_netdev(ndev);
return err;
return 0;
}
static struct platform_driver emac_rockchip_driver = {
......
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