summaryrefslogtreecommitdiff
path: root/drivers/net/ethernet/stmicro/stmmac/dwmac-stm32.c
diff options
context:
space:
mode:
authorUwe Kleine-König <u.kleine-koenig@pengutronix.de>2023-02-11 14:24:30 +0300
committerJakub Kicinski <kuba@kernel.org>2023-02-14 06:50:43 +0300
commitff0011cf56014b4dfe88adc35e36a25df63d5005 (patch)
treebae97ed82574dc7a341da81fb19009e555a4b23c /drivers/net/ethernet/stmicro/stmmac/dwmac-stm32.c
parent1dc55923296dee3eda1816bcf36be8ab064882e0 (diff)
downloadlinux-ff0011cf56014b4dfe88adc35e36a25df63d5005.tar.xz
net: stmmac: Make stmmac_dvr_remove() return void
The function returns zero unconditionally. Change it to return void instead which simplifies some callers as error handing becomes unnecessary. This also makes it more obvious that most platform remove callbacks always return zero. Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Link: https://lore.kernel.org/r/20230211112431.214252-1-u.kleine-koenig@pengutronix.de Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'drivers/net/ethernet/stmicro/stmmac/dwmac-stm32.c')
-rw-r--r--drivers/net/ethernet/stmicro/stmmac/dwmac-stm32.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac-stm32.c b/drivers/net/ethernet/stmicro/stmmac/dwmac-stm32.c
index 2b38a499a404..0616b3a04ff3 100644
--- a/drivers/net/ethernet/stmicro/stmmac/dwmac-stm32.c
+++ b/drivers/net/ethernet/stmicro/stmmac/dwmac-stm32.c
@@ -421,9 +421,10 @@ static int stm32_dwmac_remove(struct platform_device *pdev)
{
struct net_device *ndev = platform_get_drvdata(pdev);
struct stmmac_priv *priv = netdev_priv(ndev);
- int ret = stmmac_dvr_remove(&pdev->dev);
struct stm32_dwmac *dwmac = priv->plat->bsp_priv;
+ stmmac_dvr_remove(&pdev->dev);
+
stm32_dwmac_clk_disable(priv->plat->bsp_priv);
if (dwmac->irq_pwr_wakeup >= 0) {
@@ -431,7 +432,7 @@ static int stm32_dwmac_remove(struct platform_device *pdev)
device_init_wakeup(&pdev->dev, false);
}
- return ret;
+ return 0;
}
static int stm32mp1_suspend(struct stm32_dwmac *dwmac)