net: ks8851: Make ks8851_remove_common() return void

Up to now ks8851_remove_common() 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>
This commit is contained in:
Uwe Kleine-König 2021-10-15 08:56:14 +02:00 committed by David S. Miller
parent f8ba22a142
commit 2841bfd10a
4 changed files with 8 additions and 6 deletions

View file

@ -427,7 +427,7 @@ struct ks8851_net {
int ks8851_probe_common(struct net_device *netdev, struct device *dev,
int msg_en);
int ks8851_remove_common(struct device *dev);
void ks8851_remove_common(struct device *dev);
int ks8851_suspend(struct device *dev);
int ks8851_resume(struct device *dev);

View file

@ -1247,7 +1247,7 @@ err_reg_io:
}
EXPORT_SYMBOL_GPL(ks8851_probe_common);
int ks8851_remove_common(struct device *dev)
void ks8851_remove_common(struct device *dev)
{
struct ks8851_net *priv = dev_get_drvdata(dev);
@ -1261,8 +1261,6 @@ int ks8851_remove_common(struct device *dev)
gpio_set_value(priv->gpio, 0);
regulator_disable(priv->vdd_reg);
regulator_disable(priv->vdd_io);
return 0;
}
EXPORT_SYMBOL_GPL(ks8851_remove_common);

View file

@ -327,7 +327,9 @@ static int ks8851_probe_par(struct platform_device *pdev)
static int ks8851_remove_par(struct platform_device *pdev)
{
return ks8851_remove_common(&pdev->dev);
ks8851_remove_common(&pdev->dev);
return 0;
}
static const struct of_device_id ks8851_match_table[] = {

View file

@ -454,7 +454,9 @@ static int ks8851_probe_spi(struct spi_device *spi)
static int ks8851_remove_spi(struct spi_device *spi)
{
return ks8851_remove_common(&spi->dev);
ks8851_remove_common(&spi->dev);
return 0;
}
static const struct of_device_id ks8851_match_table[] = {