提交 3e089d9f 编写于 作者: S Sudip Mukherjee 提交者: Linus Walleij

gpio: pisosr: add missing unlock

If spi_read() fails then we just returned but we missed unlocking the
mutex.
Signed-off-by: NSudip Mukherjee <sudip@vectorindia.org>
Signed-off-by: NLinus Walleij <linus.walleij@linaro.org>
上级 8cae5f97
......@@ -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,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册