提交 3b2f3ceb 编写于 作者: A Abhilash Kesavan 提交者: Wolfram Sang

i2c: s3c2410: Fix code to free gpios

Store the requested gpios so that they can be freed on error/removal.
Signed-off-by: NAbhilash Kesavan <a.kesavan@samsung.com>
Signed-off-by: NWolfram Sang <w.sang@pengutronix.de>
上级 0857ba3c
......@@ -856,6 +856,7 @@ static int s3c24xx_i2c_parse_dt_gpio(struct s3c24xx_i2c *i2c)
dev_err(i2c->dev, "invalid gpio[%d]: %d\n", idx, gpio);
goto free_gpio;
}
i2c->gpios[idx] = gpio;
ret = gpio_request(gpio, "i2c-bus");
if (ret) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册