OSDN Git Service

tpm/tpm_tis_synquacer: Convert to platform remove callback returning void
authorUwe Kleine-König <u.kleine-koenig@pengutronix.de>
Mon, 20 Mar 2023 08:06:07 +0000 (09:06 +0100)
committerJarkko Sakkinen <jarkko@kernel.org>
Mon, 24 Apr 2023 13:15:53 +0000 (16:15 +0300)
commit7b69ef62034492b816c65b1d15b45834df2b194e
tree6d7b70c2d6fd7da7e052781325114a1cee600c50
parentc3da2c6eeb10e71cc7be33c4b17ced60024fd9b0
tpm/tpm_tis_synquacer: 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 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: Jarkko Sakkinen <jarkko@kernel.org>
Signed-off-by: Jarkko Sakkinen <jarkko@kernel.org>
drivers/char/tpm/tpm_tis_synquacer.c