fbdev: sh_mobile_lcdcfb: 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>
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: Helge Deller <deller@gmx.de>
This commit is contained in:
Uwe Kleine-König 2023-03-19 00:54:16 +01:00 коммит произвёл Helge Deller
Родитель 03dfa8d2be
Коммит 0682408853
1 изменённых файлов: 2 добавлений и 3 удалений

Просмотреть файл

@ -2249,7 +2249,7 @@ static const struct fb_videomode default_720p = {
.sync = FB_SYNC_VERT_HIGH_ACT | FB_SYNC_HOR_HIGH_ACT,
};
static int sh_mobile_lcdc_remove(struct platform_device *pdev)
static void sh_mobile_lcdc_remove(struct platform_device *pdev)
{
struct sh_mobile_lcdc_priv *priv = platform_get_drvdata(pdev);
unsigned int i;
@ -2305,7 +2305,6 @@ static int sh_mobile_lcdc_remove(struct platform_device *pdev)
if (priv->irq)
free_irq(priv->irq, priv);
kfree(priv);
return 0;
}
static int sh_mobile_lcdc_check_interface(struct sh_mobile_lcdc_chan *ch)
@ -2656,7 +2655,7 @@ static struct platform_driver sh_mobile_lcdc_driver = {
.pm = &sh_mobile_lcdc_dev_pm_ops,
},
.probe = sh_mobile_lcdc_probe,
.remove = sh_mobile_lcdc_remove,
.remove_new = sh_mobile_lcdc_remove,
};
module_platform_driver(sh_mobile_lcdc_driver);