summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/sti/sti_dvo.c
diff options
context:
space:
mode:
authorUwe Kleine-König <u.kleine-koenig@pengutronix.de>2023-05-07 19:26:04 +0300
committerDouglas Anderson <dianders@chromium.org>2023-06-08 19:04:12 +0300
commit9a865e45884aad3f715f7b45ccbc0537f92cbcd8 (patch)
tree6fac46b83921406449db6091db14926d35bdeab4 /drivers/gpu/drm/sti/sti_dvo.c
parent3c855610840ebe3505f0db88b51191ced0b0af1f (diff)
downloadlinux-9a865e45884aad3f715f7b45ccbc0537f92cbcd8.tar.xz
drm/sti: 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 sti drm 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> Acked-by: Alain Volmat <alain.volmat@foss.st.com> Signed-off-by: Douglas Anderson <dianders@chromium.org> Link: https://patchwork.freedesktop.org/patch/msgid/20230507162616.1368908-42-u.kleine-koenig@pengutronix.de
Diffstat (limited to 'drivers/gpu/drm/sti/sti_dvo.c')
-rw-r--r--drivers/gpu/drm/sti/sti_dvo.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/gpu/drm/sti/sti_dvo.c b/drivers/gpu/drm/sti/sti_dvo.c
index 0c6679e361c8..fd1df4ce3852 100644
--- a/drivers/gpu/drm/sti/sti_dvo.c
+++ b/drivers/gpu/drm/sti/sti_dvo.c
@@ -567,10 +567,9 @@ static int sti_dvo_probe(struct platform_device *pdev)
return component_add(&pdev->dev, &sti_dvo_ops);
}
-static int sti_dvo_remove(struct platform_device *pdev)
+static void sti_dvo_remove(struct platform_device *pdev)
{
component_del(&pdev->dev, &sti_dvo_ops);
- return 0;
}
static const struct of_device_id dvo_of_match[] = {
@@ -586,7 +585,7 @@ struct platform_driver sti_dvo_driver = {
.of_match_table = dvo_of_match,
},
.probe = sti_dvo_probe,
- .remove = sti_dvo_remove,
+ .remove_new = sti_dvo_remove,
};
MODULE_AUTHOR("Benjamin Gaignard <benjamin.gaignard@st.com>");