dect
/
linux-2.6
Archived
13
0
Fork 0

i2c: s3c2410: Fix code to free gpios

Store the requested gpios so that they can be freed on error/removal.

Signed-off-by: Abhilash Kesavan <a.kesavan@samsung.com>
Signed-off-by: Wolfram Sang <w.sang@pengutronix.de>
This commit is contained in:
Abhilash Kesavan 2012-11-19 15:48:46 +05:30 committed by Wolfram Sang
parent 0857ba3c24
commit 3b2f3ceb3c
1 changed files with 1 additions and 0 deletions

View File

@ -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) {