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

net: samsung: sxgbe: Make sxgbe_drv_remove() return void

sxgbe_drv_remove() returned zero unconditionally, so it can be converted
to return void without losing anything. The upside is that it becomes
more obvious in its callers that there is no error to handle.
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 995585ec
...@@ -511,7 +511,7 @@ struct sxgbe_priv_data { ...@@ -511,7 +511,7 @@ struct sxgbe_priv_data {
struct sxgbe_priv_data *sxgbe_drv_probe(struct device *device, struct sxgbe_priv_data *sxgbe_drv_probe(struct device *device,
struct sxgbe_plat_data *plat_dat, struct sxgbe_plat_data *plat_dat,
void __iomem *addr); void __iomem *addr);
int sxgbe_drv_remove(struct net_device *ndev); void sxgbe_drv_remove(struct net_device *ndev);
void sxgbe_set_ethtool_ops(struct net_device *netdev); void sxgbe_set_ethtool_ops(struct net_device *netdev);
int sxgbe_mdio_unregister(struct net_device *ndev); int sxgbe_mdio_unregister(struct net_device *ndev);
int sxgbe_mdio_register(struct net_device *ndev); int sxgbe_mdio_register(struct net_device *ndev);
......
...@@ -2203,7 +2203,7 @@ struct sxgbe_priv_data *sxgbe_drv_probe(struct device *device, ...@@ -2203,7 +2203,7 @@ struct sxgbe_priv_data *sxgbe_drv_probe(struct device *device,
* Description: this function resets the TX/RX processes, disables the MAC RX/TX * Description: this function resets the TX/RX processes, disables the MAC RX/TX
* changes the link status, releases the DMA descriptor rings. * changes the link status, releases the DMA descriptor rings.
*/ */
int sxgbe_drv_remove(struct net_device *ndev) void sxgbe_drv_remove(struct net_device *ndev)
{ {
struct sxgbe_priv_data *priv = netdev_priv(ndev); struct sxgbe_priv_data *priv = netdev_priv(ndev);
u8 queue_num; u8 queue_num;
...@@ -2231,8 +2231,6 @@ int sxgbe_drv_remove(struct net_device *ndev) ...@@ -2231,8 +2231,6 @@ int sxgbe_drv_remove(struct net_device *ndev)
kfree(priv->hw); kfree(priv->hw);
free_netdev(ndev); free_netdev(ndev);
return 0;
} }
#ifdef CONFIG_PM #ifdef CONFIG_PM
......
...@@ -172,9 +172,10 @@ static int sxgbe_platform_probe(struct platform_device *pdev) ...@@ -172,9 +172,10 @@ static int sxgbe_platform_probe(struct platform_device *pdev)
static int sxgbe_platform_remove(struct platform_device *pdev) static int sxgbe_platform_remove(struct platform_device *pdev)
{ {
struct net_device *ndev = platform_get_drvdata(pdev); struct net_device *ndev = platform_get_drvdata(pdev);
int ret = sxgbe_drv_remove(ndev);
return ret; sxgbe_drv_remove(ndev);
return 0;
} }
#ifdef CONFIG_PM #ifdef CONFIG_PM
......
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