diff options
author | Uwe Kleine-König <u.kleine-koenig@pengutronix.de> | 2023-05-07 18:26:01 +0200 |
---|---|---|
committer | Douglas Anderson <dianders@chromium.org> | 2023-06-08 09:04:12 -0700 |
commit | 3c855610840ebe3505f0db88b51191ced0b0af1f (patch) | |
tree | b9280f46f17c32d16d80094aef3076d059c8a3db /drivers/gpu/drm/rockchip/inno_hdmi.c | |
parent | e41977a83b71e7868098d040a0085476d3ccff0f (diff) | |
download | linux-stable-3c855610840ebe3505f0db88b51191ced0b0af1f.tar.gz linux-stable-3c855610840ebe3505f0db88b51191ced0b0af1f.tar.bz2 linux-stable-3c855610840ebe3505f0db88b51191ced0b0af1f.zip |
drm/rockchip: 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 rockchip 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: Heiko Stuebner <heiko@sntech.de>
Signed-off-by: Douglas Anderson <dianders@chromium.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20230507162616.1368908-39-u.kleine-koenig@pengutronix.de
Diffstat (limited to 'drivers/gpu/drm/rockchip/inno_hdmi.c')
-rw-r--r-- | drivers/gpu/drm/rockchip/inno_hdmi.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/gpu/drm/rockchip/inno_hdmi.c b/drivers/gpu/drm/rockchip/inno_hdmi.c index f51774866f41..6a63952a6c84 100644 --- a/drivers/gpu/drm/rockchip/inno_hdmi.c +++ b/drivers/gpu/drm/rockchip/inno_hdmi.c @@ -919,11 +919,9 @@ static int inno_hdmi_probe(struct platform_device *pdev) return component_add(&pdev->dev, &inno_hdmi_ops); } -static int inno_hdmi_remove(struct platform_device *pdev) +static void inno_hdmi_remove(struct platform_device *pdev) { component_del(&pdev->dev, &inno_hdmi_ops); - - return 0; } static const struct of_device_id inno_hdmi_dt_ids[] = { @@ -935,7 +933,7 @@ MODULE_DEVICE_TABLE(of, inno_hdmi_dt_ids); struct platform_driver inno_hdmi_driver = { .probe = inno_hdmi_probe, - .remove = inno_hdmi_remove, + .remove_new = inno_hdmi_remove, .driver = { .name = "innohdmi-rockchip", .of_match_table = inno_hdmi_dt_ids, |