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>
This commit is contained in:
committed by
Linus Walleij
parent
38ed0187d2
commit
9f5132ae82
@@ -149,20 +149,15 @@ exit_destroy:
|
||||
static int mc33880_remove(struct spi_device *spi)
|
||||
{
|
||||
struct mc33880 *mc;
|
||||
int ret;
|
||||
|
||||
mc = spi_get_drvdata(spi);
|
||||
if (mc == NULL)
|
||||
return -ENODEV;
|
||||
|
||||
ret = gpiochip_remove(&mc->chip);
|
||||
if (!ret)
|
||||
mutex_destroy(&mc->lock);
|
||||
else
|
||||
dev_err(&spi->dev, "Failed to remove the GPIO controller: %d\n",
|
||||
ret);
|
||||
gpiochip_remove(&mc->chip);
|
||||
mutex_destroy(&mc->lock);
|
||||
|
||||
return ret;
|
||||
return 0;
|
||||
}
|
||||
|
||||
static struct spi_driver mc33880_driver = {
|
||||
|
||||
Reference in New Issue
Block a user