summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/imx/ipuv3/imx-drm-core.c
diff options
context:
space:
mode:
authorUwe Kleine-König <u.kleine-koenig@pengutronix.de>2023-05-07 19:25:45 +0300
committerJavier Martinez Canillas <javierm@redhat.com>2023-09-09 17:04:40 +0300
commit3095f1122203f3af6c0362e13892ea36b7721221 (patch)
tree6fd173c89f3d1ecdd126b44c4ceb311094dabb4a /drivers/gpu/drm/imx/ipuv3/imx-drm-core.c
parent5aa1dfcdf0a429e4941e2eef75b006a8c7a8ac49 (diff)
downloadlinux-3095f1122203f3af6c0362e13892ea36b7721221.tar.xz
drm/imx/ipuv3: 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 the ipuv3 imx drivers 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: Philipp Zabel <p.zabel@pengutronix.de> Signed-off-by: Javier Martinez Canillas <javierm@redhat.com> Link: https://patchwork.freedesktop.org/patch/msgid/20230507162616.1368908-23-u.kleine-koenig@pengutronix.de
Diffstat (limited to 'drivers/gpu/drm/imx/ipuv3/imx-drm-core.c')
-rw-r--r--drivers/gpu/drm/imx/ipuv3/imx-drm-core.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/gpu/drm/imx/ipuv3/imx-drm-core.c b/drivers/gpu/drm/imx/ipuv3/imx-drm-core.c
index 4a866ac60fff..352fa31ab4ed 100644
--- a/drivers/gpu/drm/imx/ipuv3/imx-drm-core.c
+++ b/drivers/gpu/drm/imx/ipuv3/imx-drm-core.c
@@ -292,10 +292,9 @@ static int imx_drm_platform_probe(struct platform_device *pdev)
return ret;
}
-static int imx_drm_platform_remove(struct platform_device *pdev)
+static void imx_drm_platform_remove(struct platform_device *pdev)
{
component_master_del(&pdev->dev, &imx_drm_ops);
- return 0;
}
#ifdef CONFIG_PM_SLEEP
@@ -324,7 +323,7 @@ MODULE_DEVICE_TABLE(of, imx_drm_dt_ids);
static struct platform_driver imx_drm_pdrv = {
.probe = imx_drm_platform_probe,
- .remove = imx_drm_platform_remove,
+ .remove_new = imx_drm_platform_remove,
.driver = {
.name = "imx-drm",
.pm = &imx_drm_pm_ops,