Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Uwe Kleine-König and committed by
Mark Brown
316f569d c222ea5d

+4 -11
+1 -4
drivers/char/tpm/st33zp24/i2c.c
··· 267 267 static int st33zp24_i2c_remove(struct i2c_client *client) 268 268 { 269 269 struct tpm_chip *chip = i2c_get_clientdata(client); 270 - int ret; 271 270 272 - ret = st33zp24_remove(chip); 273 - if (ret) 274 - return ret; 271 + st33zp24_remove(chip); 275 272 276 273 return 0; 277 274 }
+1 -4
drivers/char/tpm/st33zp24/spi.c
··· 384 384 static int st33zp24_spi_remove(struct spi_device *dev) 385 385 { 386 386 struct tpm_chip *chip = spi_get_drvdata(dev); 387 - int ret; 388 387 389 - ret = st33zp24_remove(chip); 390 - if (ret) 391 - return ret; 388 + st33zp24_remove(chip); 392 389 393 390 return 0; 394 391 }
+1 -2
drivers/char/tpm/st33zp24/st33zp24.c
··· 511 511 } 512 512 EXPORT_SYMBOL(st33zp24_probe); 513 513 514 - int st33zp24_remove(struct tpm_chip *chip) 514 + void st33zp24_remove(struct tpm_chip *chip) 515 515 { 516 516 tpm_chip_unregister(chip); 517 - return 0; 518 517 } 519 518 EXPORT_SYMBOL(st33zp24_remove); 520 519
+1 -1
drivers/char/tpm/st33zp24/st33zp24.h
··· 34 34 35 35 int st33zp24_probe(void *phy_id, const struct st33zp24_phy_ops *ops, 36 36 struct device *dev, int irq, int io_lpcpd); 37 - int st33zp24_remove(struct tpm_chip *chip); 37 + void st33zp24_remove(struct tpm_chip *chip); 38 38 #endif /* __LOCAL_ST33ZP24_H__ */