From: Sudip Mukherjee Date: Fri, 19 Feb 2016 09:23:00 +0000 (+0530) Subject: gpio: pisosr: add missing unlock X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=3e089d9f55acfe9edd8a71d19cfc3129ab3a37f8;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git gpio: pisosr: add missing unlock If spi_read() fails then we just returned but we missed unlocking the mutex. Signed-off-by: Sudip Mukherjee Signed-off-by: Linus Walleij --- 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,