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

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: default avatarUwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent f8ba22a1
......@@ -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);
......
......@@ -1247,7 +1247,7 @@ int ks8851_probe_common(struct net_device *netdev, struct device *dev,
}
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);
......
......@@ -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[] = {
......
......@@ -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[] = {
......
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