Skip to content

Commit 4369e38

Browse files
Uwe Kleine-Könighdeller
authored andcommitted
fbdev: arcfb: 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>
1 parent d00394e commit 4369e38

1 file changed

Lines changed: 2 additions & 3 deletions

File tree

drivers/video/fbdev/arcfb.c

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -590,7 +590,7 @@ static int arcfb_probe(struct platform_device *dev)
590590
return retval;
591591
}
592592

593-
static int arcfb_remove(struct platform_device *dev)
593+
static void arcfb_remove(struct platform_device *dev)
594594
{
595595
struct fb_info *info = platform_get_drvdata(dev);
596596

@@ -601,12 +601,11 @@ static int arcfb_remove(struct platform_device *dev)
601601
vfree((void __force *)info->screen_base);
602602
framebuffer_release(info);
603603
}
604-
return 0;
605604
}
606605

607606
static struct platform_driver arcfb_driver = {
608607
.probe = arcfb_probe,
609-
.remove = arcfb_remove,
608+
.remove_new = arcfb_remove,
610609
.driver = {
611610
.name = "arcfb",
612611
},

0 commit comments

Comments
 (0)