Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 3e089d9f authored by Sudip Mukherjee's avatar Sudip Mukherjee Committed by Linus Walleij
Browse files

gpio: pisosr: add missing unlock



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

Signed-off-by: default avatarSudip Mukherjee <sudip@vectorindia.org>
Signed-off-by: default avatarLinus Walleij <linus.walleij@linaro.org>
parent 8cae5f97
Loading
Loading
Loading
Loading
+1 −3
Original line number Diff line number Diff line
@@ -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,