Unverified Commit 316f569d authored by Uwe Kleine-König's avatar Uwe Kleine-König Committed by Mark Brown
Browse files

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: default avatarUwe Kleine-König <u.kleine-koenig@pengutronix.de>
Acked-by: default avatarLee Jones <lee.jones@linaro.org>
Link: https://lore.kernel.org/r/20220123175201.34839-4-u.kleine-koenig@pengutronix.de


Signed-off-by: default avatarMark Brown <broonie@kernel.org>
parent c222ea5d
Loading
Loading
Loading
Loading
+1 −4
Original line number Diff line number Diff line
@@ -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;
}
+1 −4
Original line number Diff line number Diff line
@@ -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;
}
+1 −2
Original line number Diff line number Diff line
@@ -511,10 +511,9 @@ int st33zp24_probe(void *phy_id, const struct st33zp24_phy_ops *ops,
}
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);

+1 −1
Original line number Diff line number Diff line
@@ -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__ */