summaryrefslogtreecommitdiff
path: root/drivers/video/fbdev/mx3fb.c
diff options
context:
space:
mode:
authorUwe Kleine-König <u.kleine-koenig@pengutronix.de>2023-03-19 00:54:04 +0100
committerHelge Deller <deller@gmx.de>2023-04-24 11:48:31 +0200
commit419368fba704bf34c6d04a891b3989f47678911e (patch)
tree83ab1926fbd62472d41e1973e975c546088232e6 /drivers/video/fbdev/mx3fb.c
parentd0513776c132e040b2a438864dd1a2a362326858 (diff)
fbdev: mx3fb: 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/mx3fb.c')
-rw-r--r--drivers/video/fbdev/mx3fb.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/video/fbdev/mx3fb.c b/drivers/video/fbdev/mx3fb.c
index 76771e126d0a..63c186e0364a 100644
--- a/drivers/video/fbdev/mx3fb.c
+++ b/drivers/video/fbdev/mx3fb.c
@@ -1616,7 +1616,7 @@ eremap:
return ret;
}
-static int mx3fb_remove(struct platform_device *dev)
+static void mx3fb_remove(struct platform_device *dev)
{
struct mx3fb_data *mx3fb = platform_get_drvdata(dev);
struct fb_info *fbi = mx3fb->fbi;
@@ -1632,7 +1632,6 @@ static int mx3fb_remove(struct platform_device *dev)
dmaengine_put();
iounmap(mx3fb->reg_base);
- return 0;
}
static struct platform_driver mx3fb_driver = {
@@ -1640,7 +1639,7 @@ static struct platform_driver mx3fb_driver = {
.name = MX3FB_NAME,
},
.probe = mx3fb_probe,
- .remove = mx3fb_remove,
+ .remove_new = mx3fb_remove,
.suspend = mx3fb_suspend,
.resume = mx3fb_resume,
};