Skip to content

Commit

Permalink
i2c: s3c2410: Fix code to free gpios
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Abhilash Kesavan authored and Wolfram Sang committed Nov 19, 2012
1 parent aedc256 commit 963f207
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions drivers/i2c/busses/i2c-s3c2410.c
Original file line number Diff line number Diff line change
Expand Up @@ -806,6 +806,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) {
Expand Down

0 comments on commit 963f207

Please sign in to comment.