summaryrefslogtreecommitdiff
path: root/drivers/video/fbdev/omap2/omapfb/dss/hdmi5.c
diff options
context:
space:
mode:
authorUwe Kleine-König <u.kleine-koenig@pengutronix.de>2023-03-19 00:54:07 +0100
committerHelge Deller <deller@gmx.de>2023-04-24 11:48:31 +0200
commitdc6b77badc752e4965919f7b81ad9e3725ae0a64 (patch)
treebddc484a9ba77d32d3c276048230ccde72531424 /drivers/video/fbdev/omap2/omapfb/dss/hdmi5.c
parentdb031426eb4680137f023d75fdb3646664227335 (diff)
fbdev: omapfb: 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 (mostly) ignored 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. 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> Signed-off-by: Helge Deller <deller@gmx.de>
Diffstat (limited to 'drivers/video/fbdev/omap2/omapfb/dss/hdmi5.c')
-rw-r--r--drivers/video/fbdev/omap2/omapfb/dss/hdmi5.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/video/fbdev/omap2/omapfb/dss/hdmi5.c b/drivers/video/fbdev/omap2/omapfb/dss/hdmi5.c
index bfccc2cb917a..03292945b1d4 100644
--- a/drivers/video/fbdev/omap2/omapfb/dss/hdmi5.c
+++ b/drivers/video/fbdev/omap2/omapfb/dss/hdmi5.c
@@ -797,10 +797,9 @@ static int hdmi5_probe(struct platform_device *pdev)
return component_add(&pdev->dev, &hdmi5_component_ops);
}
-static int hdmi5_remove(struct platform_device *pdev)
+static void hdmi5_remove(struct platform_device *pdev)
{
component_del(&pdev->dev, &hdmi5_component_ops);
- return 0;
}
static int hdmi_runtime_suspend(struct device *dev)
@@ -834,7 +833,7 @@ static const struct of_device_id hdmi_of_match[] = {
static struct platform_driver omapdss_hdmihw_driver = {
.probe = hdmi5_probe,
- .remove = hdmi5_remove,
+ .remove_new = hdmi5_remove,
.driver = {
.name = "omapdss_hdmi5",
.pm = &hdmi_pm_ops,