media: staging: media: tegra-video: Convert to platform remove callback returning...
authorUwe Kleine-König <u.kleine-koenig@pengutronix.de>
Thu, 26 Oct 2023 21:47:40 +0000 (23:47 +0200)
committerMauro Carvalho Chehab <mchehab@kernel.org>
Thu, 23 Nov 2023 12:36:02 +0000 (13:36 +0100)
commit074728523dd18da4226d43db6756ae9128d6a2f0
treedc793d860b978e07d25b29bcdbd7d054d88219c8
parentded85b0c0edd8f45fec88783d7555a5b982449c1
media: staging: media: tegra-video: 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 the three tegra-video 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: Luca Ceresoli <luca.ceresoli@bootlin.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
drivers/staging/media/tegra-video/csi.c
drivers/staging/media/tegra-video/vi.c
drivers/staging/media/tegra-video/vip.c