gpio: max730x: Make __max730x_remove() return void
authorUwe Kleine-König <u.kleine-koenig@pengutronix.de>
Tue, 12 Oct 2021 15:39:27 +0000 (17:39 +0200)
committerBartosz Golaszewski <brgl@bgdev.pl>
Wed, 13 Oct 2021 17:52:26 +0000 (19:52 +0200)
commit06de2cd788bfa3b51137e9bd471d68029ab68103
tree8a1042de7ffc0b9997891a17c0f1555f67145eb2
parentaa4858eb8264358e9c18c3ad79d6ab4fdc71e0c2
gpio: max730x: Make __max730x_remove() return void

An spi or i2c remove callback is only called for devices that probed
successfully. In this case this implies that __max730x_probe() set a
non-NULL driver data. So the check ts == NULL is never true. With this
check dropped, __max730x_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: Bartosz Golaszewski <brgl@bgdev.pl>
drivers/gpio/gpio-max7300.c
drivers/gpio/gpio-max7301.c
drivers/gpio/gpio-max730x.c
include/linux/spi/max7301.h