diff options
author | abdoulaye berthe <berthe.ab@gmail.com> | 2014-07-12 22:30:12 +0200 |
---|---|---|
committer | Linus Walleij <linus.walleij@linaro.org> | 2014-07-22 16:39:26 +0200 |
commit | 9f5132ae82fdbb047cc187bf689a81c8cc0de7fa (patch) | |
tree | 3d5ce5c1a1ff25fdbec52416ad21eb1ad14ca25f /drivers/gpio/gpio-mcp23s08.c | |
parent | 38ed0187d2da7f219f9f84d8921b5c95b266b34b (diff) | |
download | linux-9f5132ae82fdbb047cc187bf689a81c8cc0de7fa.tar.bz2 |
gpio: remove all usage of gpio_remove retval in driver/gpio
Signed-off-by: abdoulaye berthe <berthe.ab@gmail.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Diffstat (limited to 'drivers/gpio/gpio-mcp23s08.c')
-rw-r--r-- | drivers/gpio/gpio-mcp23s08.c | 26 |
1 files changed, 7 insertions, 19 deletions
diff --git a/drivers/gpio/gpio-mcp23s08.c b/drivers/gpio/gpio-mcp23s08.c index fe7c0e211f9a..4fe07864fa03 100644 --- a/drivers/gpio/gpio-mcp23s08.c +++ b/drivers/gpio/gpio-mcp23s08.c @@ -812,16 +812,14 @@ fail: static int mcp230xx_remove(struct i2c_client *client) { struct mcp23s08 *mcp = i2c_get_clientdata(client); - int status; if (client->irq && mcp->irq_controller) mcp23s08_irq_teardown(mcp); - status = gpiochip_remove(&mcp->chip); - if (status == 0) - kfree(mcp); + gpiochip_remove(&mcp->chip); + kfree(mcp); - return status; + return 0; } static const struct i2c_device_id mcp230xx_id[] = { @@ -966,13 +964,10 @@ static int mcp23s08_probe(struct spi_device *spi) fail: for (addr = 0; addr < ARRAY_SIZE(data->mcp); addr++) { - int tmp; if (!data->mcp[addr]) continue; - tmp = gpiochip_remove(&data->mcp[addr]->chip); - if (tmp < 0) - dev_err(&spi->dev, "%s --> %d\n", "remove", tmp); + gpiochip_remove(&data->mcp[addr]->chip); } kfree(data); return status; @@ -982,23 +977,16 @@ static int mcp23s08_remove(struct spi_device *spi) { struct mcp23s08_driver_data *data = spi_get_drvdata(spi); unsigned addr; - int status = 0; for (addr = 0; addr < ARRAY_SIZE(data->mcp); addr++) { - int tmp; if (!data->mcp[addr]) continue; - tmp = gpiochip_remove(&data->mcp[addr]->chip); - if (tmp < 0) { - dev_err(&spi->dev, "%s --> %d\n", "remove", tmp); - status = tmp; - } + gpiochip_remove(&data->mcp[addr]->chip); } - if (status == 0) - kfree(data); - return status; + kfree(data); + return 0; } static const struct spi_device_id mcp23s08_ids[] = { |