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

mfd: stmpe: Make stmpe_remove() return void

Up to now stmpe_remove() returns zero unconditionally. Make it return
void 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.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Link: https://lore.kernel.org/r/20211012153945.2651412-10-u.kleine-koenig@pengutronix.de

authored by

Uwe Kleine-König and committed by
Lee Jones
356bbaba c39cf60f

+8 -6
+3 -1
drivers/mfd/stmpe-i2c.c
··· 95 95 { 96 96 struct stmpe *stmpe = dev_get_drvdata(&i2c->dev); 97 97 98 - return stmpe_remove(stmpe); 98 + stmpe_remove(stmpe); 99 + 100 + return 0; 99 101 } 100 102 101 103 static const struct i2c_device_id stmpe_i2c_id[] = {
+3 -1
drivers/mfd/stmpe-spi.c
··· 106 106 { 107 107 struct stmpe *stmpe = spi_get_drvdata(spi); 108 108 109 - return stmpe_remove(stmpe); 109 + stmpe_remove(stmpe); 110 + 111 + return 0; 110 112 } 111 113 112 114 static const struct of_device_id stmpe_spi_of_match[] = {
+1 -3
drivers/mfd/stmpe.c
··· 1496 1496 return ret; 1497 1497 } 1498 1498 1499 - int stmpe_remove(struct stmpe *stmpe) 1499 + void stmpe_remove(struct stmpe *stmpe) 1500 1500 { 1501 1501 if (!IS_ERR(stmpe->vio)) 1502 1502 regulator_disable(stmpe->vio); ··· 1506 1506 __stmpe_disable(stmpe, STMPE_BLOCK_ADC); 1507 1507 1508 1508 mfd_remove_devices(stmpe->dev); 1509 - 1510 - return 0; 1511 1509 } 1512 1510 1513 1511 #ifdef CONFIG_PM
+1 -1
drivers/mfd/stmpe.h
··· 98 98 }; 99 99 100 100 int stmpe_probe(struct stmpe_client_info *ci, enum stmpe_partnum partnum); 101 - int stmpe_remove(struct stmpe *stmpe); 101 + void stmpe_remove(struct stmpe *stmpe); 102 102 103 103 #define STMPE_ICR_LSB_HIGH (1 << 2) 104 104 #define STMPE_ICR_LSB_EDGE (1 << 1)