summaryrefslogtreecommitdiff
path: root/drivers/gpio/gpio-max7300.c
diff options
context:
space:
mode:
authorUwe Kleine-König <u.kleine-koenig@pengutronix.de>2021-10-12 17:39:27 +0200
committerBartosz Golaszewski <brgl@bgdev.pl>2021-10-13 19:52:26 +0200
commit06de2cd788bfa3b51137e9bd471d68029ab68103 (patch)
tree8a1042de7ffc0b9997891a17c0f1555f67145eb2 /drivers/gpio/gpio-max7300.c
parentaa4858eb8264358e9c18c3ad79d6ab4fdc71e0c2 (diff)
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>
Diffstat (limited to 'drivers/gpio/gpio-max7300.c')
-rw-r--r--drivers/gpio/gpio-max7300.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/gpio/gpio-max7300.c b/drivers/gpio/gpio-max7300.c
index 19cc2ed6a3f5..b2b547dd6e84 100644
--- a/drivers/gpio/gpio-max7300.c
+++ b/drivers/gpio/gpio-max7300.c
@@ -50,7 +50,9 @@ static int max7300_probe(struct i2c_client *client,
static int max7300_remove(struct i2c_client *client)
{
- return __max730x_remove(&client->dev);
+ __max730x_remove(&client->dev);
+
+ return 0;
}
static const struct i2c_device_id max7300_id[] = {