]> git.ipfire.org Git - thirdparty/linux.git/commit
drm/mediatek: Convert to platform remove callback returning void
authorUwe Kleine-König <u.kleine-koenig@pengutronix.de>
Tue, 9 Apr 2024 17:02:49 +0000 (19:02 +0200)
committerChun-Kuang Hu <chunkuang.hu@kernel.org>
Sat, 8 Jun 2024 01:37:30 +0000 (01:37 +0000)
commitf5d5759d29e93fa76466204ad34169b3900a36c6
tree4908b13d48ade24cd9e39e9c967ddc7a527eeb6a
parent1613e604df0cd359cf2a7fbd9be7a0bcfacfabd0
drm/mediatek: 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 ignored (apart
from emitting a warning) 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. Eventually after all drivers
are converted, .remove_new() will be renamed to .remove().

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: CK Hu <ck.hu@mediatek.com>
Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Link: https://patchwork.kernel.org/project/dri-devel/patch/4a64dfbfbcfdf9b7cd46bc8026223e69a4b453b4.1712681770.git.u.kleine-koenig@pengutronix.de/
Signed-off-by: Chun-Kuang Hu <chunkuang.hu@kernel.org>
drivers/gpu/drm/mediatek/mtk_padding.c