summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorUwe Kleine-König <u.kleine-koenig@pengutronix.de>2023-03-19 02:53:49 +0300
committerHelge Deller <deller@gmx.de>2023-04-24 12:48:29 +0300
commit33c890d022f91d7807cc9673f7017b480f64b2cf (patch)
treea717df4d871f3b83c44f4de6e0bc1d0c4e0e8321
parentac40ac6ca0fae749417819d9081d79886b1154a4 (diff)
downloadlinux-33c890d022f91d7807cc9673f7017b480f64b2cf.tar.xz
fbdev: da8xx-fb: 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>
-rw-r--r--drivers/video/fbdev/da8xx-fb.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/video/fbdev/da8xx-fb.c b/drivers/video/fbdev/da8xx-fb.c
index cd07e401b326..60cd1286370f 100644
--- a/drivers/video/fbdev/da8xx-fb.c
+++ b/drivers/video/fbdev/da8xx-fb.c
@@ -1064,7 +1064,7 @@ static void lcd_da8xx_cpufreq_deregister(struct da8xx_fb_par *par)
}
#endif
-static int fb_remove(struct platform_device *dev)
+static void fb_remove(struct platform_device *dev)
{
struct fb_info *info = platform_get_drvdata(dev);
struct da8xx_fb_par *par = info->par;
@@ -1091,8 +1091,6 @@ static int fb_remove(struct platform_device *dev)
pm_runtime_put_sync(&dev->dev);
pm_runtime_disable(&dev->dev);
framebuffer_release(info);
-
- return 0;
}
/*
@@ -1657,7 +1655,7 @@ static SIMPLE_DEV_PM_OPS(fb_pm_ops, fb_suspend, fb_resume);
static struct platform_driver da8xx_fb_driver = {
.probe = fb_probe,
- .remove = fb_remove,
+ .remove_new = fb_remove,
.driver = {
.name = DRIVER_NAME,
.pm = &fb_pm_ops,