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…
Reference in New Issue