diff options
author | Uwe Kleine-König <u.kleine-koenig@pengutronix.de> | 2022-08-15 10:02:29 +0200 |
---|---|---|
committer | Wolfram Sang <wsa@kernel.org> | 2022-08-16 12:34:13 +0200 |
commit | 6a8f359c3132e4f51bdb263ad74ec632c65e55fd (patch) | |
tree | eea078421e0728ab3900285e0de326b0e3d4d246 /drivers | |
parent | leds: lm3601x: Improve error reporting for problems during .remove() (diff) | |
download | linux-6a8f359c3132e4f51bdb263ad74ec632c65e55fd.tar.xz linux-6a8f359c3132e4f51bdb263ad74ec632c65e55fd.zip |
gpio: pca953x: Make platform teardown callback return void
All platforms that provide a teardown callback return 0. New users are
supposed to not make use of platform support, so there is no
functionality lost.
This patch is a preparation for making i2c remove callbacks return void.
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Acked-by: Bartosz Golaszewski <brgl@bgdev.pl>
Signed-off-by: Wolfram Sang <wsa@kernel.org>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/gpio/gpio-pca953x.c | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/drivers/gpio/gpio-pca953x.c b/drivers/gpio/gpio-pca953x.c index ecd7d169470b..1860e566eb94 100644 --- a/drivers/gpio/gpio-pca953x.c +++ b/drivers/gpio/gpio-pca953x.c @@ -1105,20 +1105,15 @@ static int pca953x_remove(struct i2c_client *client) { struct pca953x_platform_data *pdata = dev_get_platdata(&client->dev); struct pca953x_chip *chip = i2c_get_clientdata(client); - int ret; if (pdata && pdata->teardown) { - ret = pdata->teardown(client, chip->gpio_chip.base, - chip->gpio_chip.ngpio, pdata->context); - if (ret < 0) - dev_err(&client->dev, "teardown failed, %d\n", ret); - } else { - ret = 0; + pdata->teardown(client, chip->gpio_chip.base, + chip->gpio_chip.ngpio, pdata->context); } regulator_disable(chip->regulator); - return ret; + return 0; } #ifdef CONFIG_PM_SLEEP |