From dc6b77badc752e4965919f7b81ad9e3725ae0a64 Mon Sep 17 00:00:00 2001 From: Uwe Kleine-König Date: Sun, 19 Mar 2023 00:54:07 +0100 Subject: fbdev: omapfb: Convert to platform remove callback returning void MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 Signed-off-by: Helge Deller --- drivers/video/fbdev/omap2/omapfb/dss/hdmi5.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'drivers/video/fbdev/omap2/omapfb/dss/hdmi5.c') 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, -- cgit