tpm: st33zp24: Make st33zp24_remove() a void function

Up to now st33zp24_remove() returns zero unconditionally. Make it return
no value instead which makes it easier to see in the callers that there is
no error to handle.

Also the return value of i2c and spi remove callbacks is ignored anyway.

Link: https://lore.kernel.org/r/20220104231103.227924-1-u.kleine-koenig@pengutronix.de
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Acked-by: Lee Jones <lee.jones@linaro.org>
Link: https://lore.kernel.org/r/20220123175201.34839-4-u.kleine-koenig@pengutronix.de
Signed-off-by: Mark Brown <broonie@kernel.org>
This commit is contained in:
Uwe Kleine-König 2022-01-23 18:51:59 +01:00 committed by Mark Brown
parent c222ea5d2f
commit 316f569df7
No known key found for this signature in database
GPG Key ID: 24D68B725D5487D0
4 changed files with 4 additions and 11 deletions

View File

@ -267,11 +267,8 @@ static int st33zp24_i2c_probe(struct i2c_client *client,
static int st33zp24_i2c_remove(struct i2c_client *client)
{
struct tpm_chip *chip = i2c_get_clientdata(client);
int ret;
ret = st33zp24_remove(chip);
if (ret)
return ret;
st33zp24_remove(chip);
return 0;
}

View File

@ -384,11 +384,8 @@ static int st33zp24_spi_probe(struct spi_device *dev)
static int st33zp24_spi_remove(struct spi_device *dev)
{
struct tpm_chip *chip = spi_get_drvdata(dev);
int ret;
ret = st33zp24_remove(chip);
if (ret)
return ret;
st33zp24_remove(chip);
return 0;
}

View File

@ -511,10 +511,9 @@ _tpm_clean_answer:
}
EXPORT_SYMBOL(st33zp24_probe);
int st33zp24_remove(struct tpm_chip *chip)
void st33zp24_remove(struct tpm_chip *chip)
{
tpm_chip_unregister(chip);
return 0;
}
EXPORT_SYMBOL(st33zp24_remove);

View File

@ -34,5 +34,5 @@ int st33zp24_pm_resume(struct device *dev);
int st33zp24_probe(void *phy_id, const struct st33zp24_phy_ops *ops,
struct device *dev, int irq, int io_lpcpd);
int st33zp24_remove(struct tpm_chip *chip);
void st33zp24_remove(struct tpm_chip *chip);
#endif /* __LOCAL_ST33ZP24_H__ */