Skip to content

Commit 94bada5

Browse files
Uwe Kleine-Könighdeller
authored andcommitted
fbdev: uvesafb: 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 1fd9927 commit 94bada5

1 file changed

Lines changed: 2 additions & 4 deletions

File tree

drivers/video/fbdev/uvesafb.c

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1774,7 +1774,7 @@ static int uvesafb_probe(struct platform_device *dev)
17741774
return err;
17751775
}
17761776

1777-
static int uvesafb_remove(struct platform_device *dev)
1777+
static void uvesafb_remove(struct platform_device *dev)
17781778
{
17791779
struct fb_info *info = platform_get_drvdata(dev);
17801780
struct uvesafb_par *par = info->par;
@@ -1793,13 +1793,11 @@ static int uvesafb_remove(struct platform_device *dev)
17931793
kfree(par->vbe_state_saved);
17941794

17951795
framebuffer_release(info);
1796-
1797-
return 0;
17981796
}
17991797

18001798
static struct platform_driver uvesafb_driver = {
18011799
.probe = uvesafb_probe,
1802-
.remove = uvesafb_remove,
1800+
.remove_new = uvesafb_remove,
18031801
.driver = {
18041802
.name = "uvesafb",
18051803
},

0 commit comments

Comments
 (0)