coresight: replicator: Convert to platform remove callback returning void
authorUwe Kleine-König <u.kleine-koenig@pengutronix.de>
Thu, 16 Nov 2023 17:33:05 +0000 (18:33 +0100)
committerSuzuki K Poulose <suzuki.poulose@arm.com>
Thu, 16 Nov 2023 18:17:23 +0000 (18:17 +0000)
commit3d1e99f73409499742142ca14ff00946a9e442af
treeb88e7ac863839aa216d65a56b43c57730f988a9c
parent858aebb52cc0f4b3446842fb5169bdf33fc136d4
coresight: replicator: 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.

Reviewed-by: James Clark <james.clark@arm.com>
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Suzuki K Poulose <suzuki.poulose@arm.com>
Link: https://lore.kernel.org/r/20231116173301.708873-12-u.kleine-koenig@pengutronix.de
drivers/hwtracing/coresight/coresight-replicator.c