gpio: pisosr: add missing unlock

If spi_read() fails then we just returned but we missed unlocking the
mutex.

Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
This commit is contained in:
Sudip Mukherjee 2016-02-19 14:53:00 +05:30 committed by Linus Walleij
parent 8cae5f9740
commit 3e089d9f55

View File

@ -53,12 +53,10 @@ static int pisosr_gpio_refresh(struct pisosr_gpio *gpio)
}
ret = spi_read(gpio->spi, gpio->buffer, gpio->buffer_size);
if (ret)
return ret;
mutex_unlock(&gpio->lock);
return 0;
return ret;
}
static int pisosr_gpio_get_direction(struct gpio_chip *chip,