summaryrefslogtreecommitdiff
path: root/drivers/mfd/intel-lpss-acpi.c
diff options
context:
space:
mode:
authorUwe Kleine-König <u.kleine-koenig@pengutronix.de>2023-11-23 17:56:34 +0100
committerLee Jones <lee@kernel.org>2023-12-07 13:50:26 +0000
commitdd28e01d39d56ba11bf0ccb08b9b73447ad51189 (patch)
treed4f06ca610fe69ee4f317540ca6978c4090bf03b /drivers/mfd/intel-lpss-acpi.c
parent022457cfec84c5ec7a70b5cb9bef587dc7f21681 (diff)
mfd: intel-lpss-acpi: Convert to platform remove callback returning void
The .remove() callback for a platform driver returns an int which makes many driver authors wrongly assume it's possible to do error handling by returning an error code. However the value returned is ignored (apart from emitting a warning) and this typically results in resource leaks. To improve here there is a quest to make the remove callback return void. In the first step of this quest all drivers are converted to .remove_new(), which already returns void. Eventually after all drivers are converted, .remove_new() will be renamed to .remove(). Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Link: https://lore.kernel.org/r/20231123165627.492259-7-u.kleine-koenig@pengutronix.de Signed-off-by: Lee Jones <lee@kernel.org>
Diffstat (limited to 'drivers/mfd/intel-lpss-acpi.c')
-rw-r--r--drivers/mfd/intel-lpss-acpi.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/mfd/intel-lpss-acpi.c b/drivers/mfd/intel-lpss-acpi.c
index 212818aef93e..5184fd1a5df1 100644
--- a/drivers/mfd/intel-lpss-acpi.c
+++ b/drivers/mfd/intel-lpss-acpi.c
@@ -198,19 +198,17 @@ static int intel_lpss_acpi_probe(struct platform_device *pdev)
return 0;
}
-static int intel_lpss_acpi_remove(struct platform_device *pdev)
+static void intel_lpss_acpi_remove(struct platform_device *pdev)
{
intel_lpss_remove(&pdev->dev);
pm_runtime_disable(&pdev->dev);
-
- return 0;
}
static INTEL_LPSS_PM_OPS(intel_lpss_acpi_pm_ops);
static struct platform_driver intel_lpss_acpi_driver = {
.probe = intel_lpss_acpi_probe,
- .remove = intel_lpss_acpi_remove,
+ .remove_new = intel_lpss_acpi_remove,
.driver = {
.name = "intel-lpss",
.acpi_match_table = intel_lpss_acpi_ids,