media: bcm2835-unicam: Convert to platform remove callback returning void
authorUwe Kleine-König <u.kleine-koenig@pengutronix.de>
Mon, 6 May 2024 10:09:16 +0000 (12:09 +0200)
committerLaurent Pinchart <laurent.pinchart@ideasonboard.com>
Thu, 9 May 2024 21:59:33 +0000 (00:59 +0300)
commitabfec2e172c0728363824f45f11a913bd77bd791
treeb627188508315c8d78724f08c0256dbd951d37c8
parent48259b90973718d2277db27b5e510f0fe957eaa0
media: bcm2835-unicam: 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: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Link: https://lore.kernel.org/r/20240506100917.1544174-2-u.kleine-koenig@pengutronix.de
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
drivers/media/platform/broadcom/bcm2835-unicam.c