net: w5100: Make w5100_remove() return void
authorUwe Kleine-König <u.kleine-koenig@pengutronix.de>
Fri, 15 Oct 2021 06:56:15 +0000 (08:56 +0200)
committerDavid S. Miller <davem@davemloft.net>
Mon, 18 Oct 2021 11:59:12 +0000 (12:59 +0100)
Up to now w5100_remove() returns zero unconditionally. Make it return
void instead which makes it easier to see in the callers that there is
no error to handle.

Also the return value of platform and spi remove callbacks is ignored
anyway.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/wiznet/w5100-spi.c
drivers/net/ethernet/wiznet/w5100.c
drivers/net/ethernet/wiznet/w5100.h

index 2b84848dc26a594a47b427cf5d1c12e9730b5f66..7779a36da3c85dd6d6abaadefdfa6f18f78bc809 100644 (file)
@@ -463,7 +463,9 @@ static int w5100_spi_probe(struct spi_device *spi)
 
 static int w5100_spi_remove(struct spi_device *spi)
 {
-       return w5100_remove(&spi->dev);
+       w5100_remove(&spi->dev);
+
+       return 0;
 }
 
 static const struct spi_device_id w5100_spi_ids[] = {
index 88fc65ed00171c0a7d87b8490d61e03fcdbaff88..ae24d6b868031db00ca135d17fdf291760bbf1e2 100644 (file)
@@ -1064,7 +1064,9 @@ static int w5100_mmio_probe(struct platform_device *pdev)
 
 static int w5100_mmio_remove(struct platform_device *pdev)
 {
-       return w5100_remove(&pdev->dev);
+       w5100_remove(&pdev->dev);
+
+       return 0;
 }
 
 void *w5100_ops_priv(const struct net_device *ndev)
@@ -1210,7 +1212,7 @@ err_register:
 }
 EXPORT_SYMBOL_GPL(w5100_probe);
 
-int w5100_remove(struct device *dev)
+void w5100_remove(struct device *dev)
 {
        struct net_device *ndev = dev_get_drvdata(dev);
        struct w5100_priv *priv = netdev_priv(ndev);
@@ -1226,7 +1228,6 @@ int w5100_remove(struct device *dev)
 
        unregister_netdev(ndev);
        free_netdev(ndev);
-       return 0;
 }
 EXPORT_SYMBOL_GPL(w5100_remove);
 
index 5d3d4b541fec452e75e49bd8f9a920257c05f1ad..481af3b6d9e8c65dbab042f7772484f70c208cee 100644 (file)
@@ -31,6 +31,6 @@ void *w5100_ops_priv(const struct net_device *ndev);
 int w5100_probe(struct device *dev, const struct w5100_ops *ops,
                int sizeof_ops_priv, const void *mac_addr, int irq,
                int link_gpio);
-int w5100_remove(struct device *dev);
+void w5100_remove(struct device *dev);
 
 extern const struct dev_pm_ops w5100_pm_ops;