diff options
author | Sudip Mukherjee <sudipm.mukherjee@gmail.com> | 2016-02-19 12:23:00 +0300 |
---|---|---|
committer | Linus Walleij <linus.walleij@linaro.org> | 2016-02-19 14:56:13 +0300 |
commit | 3e089d9f55acfe9edd8a71d19cfc3129ab3a37f8 (patch) | |
tree | 231b18f919bc9448fb42ff6f085b0ec94487f9ea /drivers/gpio/gpio-pisosr.c | |
parent | 8cae5f9740676a46c0b5eb35e60cd13c46b99bd0 (diff) | |
download | linux-3e089d9f55acfe9edd8a71d19cfc3129ab3a37f8.tar.xz |
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>
Diffstat (limited to 'drivers/gpio/gpio-pisosr.c')
-rw-r--r-- | drivers/gpio/gpio-pisosr.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/gpio/gpio-pisosr.c b/drivers/gpio/gpio-pisosr.c index 58ea08dfdfce..f9f1074744ab 100644 --- a/drivers/gpio/gpio-pisosr.c +++ b/drivers/gpio/gpio-pisosr.c @@ -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, |