mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2025-01-10 07:00:48 +00:00
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:
parent
8cae5f9740
commit
3e089d9f55
@ -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,
|
||||
|
Loading…
x
Reference in New Issue
Block a user