diff options
author | Uwe Kleine-König <u.kleine-koenig@pengutronix.de> | 2022-04-25 19:32:55 +0200 |
---|---|---|
committer | Bartosz Golaszewski <brgl@bgdev.pl> | 2022-04-25 20:55:39 +0200 |
commit | fae74fb5d525f979085b6e70b883d7a7049bf15f (patch) | |
tree | 6f88c76459e2d710527e138237c6098cac141309 /drivers/gpio/gpio-pcf857x.c | |
parent | irq/gpio: ixp4xx: Drop boardfile probe path (diff) | |
download | linux-fae74fb5d525f979085b6e70b883d7a7049bf15f.tar.xz linux-fae74fb5d525f979085b6e70b883d7a7049bf15f.zip |
gpio: pcf857x: Make teardown callback return void
All teardown functions return 0. Also there is little sense in returning
a negative error code from an i2c remove function as this only results in
emitting an error message but the device is removed nevertheless.
This patch is a preparation for making i2c remove callbacks return void.
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-pcf857x.c')
-rw-r--r-- | drivers/gpio/gpio-pcf857x.c | 14 |
1 files changed, 3 insertions, 11 deletions
diff --git a/drivers/gpio/gpio-pcf857x.c b/drivers/gpio/gpio-pcf857x.c index b7568ee33696..e3a53dd5df1e 100644 --- a/drivers/gpio/gpio-pcf857x.c +++ b/drivers/gpio/gpio-pcf857x.c @@ -396,20 +396,12 @@ static int pcf857x_remove(struct i2c_client *client) { struct pcf857x_platform_data *pdata = dev_get_platdata(&client->dev); struct pcf857x *gpio = i2c_get_clientdata(client); - int status = 0; - if (pdata && pdata->teardown) { - status = pdata->teardown(client, - gpio->chip.base, gpio->chip.ngpio, + if (pdata && pdata->teardown) + pdata->teardown(client, gpio->chip.base, gpio->chip.ngpio, pdata->context); - if (status < 0) { - dev_err(&client->dev, "%s --> %d\n", - "teardown", status); - return status; - } - } - return status; + return 0; } static void pcf857x_shutdown(struct i2c_client *client) |