summaryrefslogtreecommitdiff
path: root/drivers/video/fbdev/s3c-fb.c
diff options
context:
space:
mode:
authorUwe Kleine-König <u.kleine-koenig@pengutronix.de>2023-03-19 02:54:14 +0300
committerHelge Deller <deller@gmx.de>2023-04-24 12:48:32 +0300
commitf2f34fb9f94f79f7d7bb12410d2e0b7f3b867a54 (patch)
treec36775ca0f6c8a6aaaf3d90149cb10087b915658 /drivers/video/fbdev/s3c-fb.c
parent77da73b32ceae6bb240fb57be6858042c76f9362 (diff)
downloadlinux-f2f34fb9f94f79f7d7bb12410d2e0b7f3b867a54.tar.xz
fbdev: s3c-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>
Diffstat (limited to 'drivers/video/fbdev/s3c-fb.c')
-rw-r--r--drivers/video/fbdev/s3c-fb.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/video/fbdev/s3c-fb.c b/drivers/video/fbdev/s3c-fb.c
index 3abbc5737c3b..1ce707e4cfd0 100644
--- a/drivers/video/fbdev/s3c-fb.c
+++ b/drivers/video/fbdev/s3c-fb.c
@@ -1507,7 +1507,7 @@ err_bus_clk:
* Shutdown and then release all the resources that the driver allocated
* on initialisation.
*/
-static int s3c_fb_remove(struct platform_device *pdev)
+static void s3c_fb_remove(struct platform_device *pdev)
{
struct s3c_fb *sfb = platform_get_drvdata(pdev);
int win;
@@ -1525,8 +1525,6 @@ static int s3c_fb_remove(struct platform_device *pdev)
pm_runtime_put_sync(sfb->dev);
pm_runtime_disable(sfb->dev);
-
- return 0;
}
#ifdef CONFIG_PM_SLEEP
@@ -1794,7 +1792,7 @@ static const struct dev_pm_ops s3cfb_pm_ops = {
static struct platform_driver s3c_fb_driver = {
.probe = s3c_fb_probe,
- .remove = s3c_fb_remove,
+ .remove_new = s3c_fb_remove,
.id_table = s3c_fb_driver_ids,
.driver = {
.name = "s3c-fb",