aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/i2c
diff options
context:
space:
mode:
authorAbhilash Kesavan <a.kesavan@samsung.com>2012-11-19 05:18:46 -0500
committerWolfram Sang <w.sang@pengutronix.de>2012-11-19 05:54:54 -0500
commit3b2f3ceb3c7f4a8c2d11aa7652842e5ce1b0dcc3 (patch)
tree0c5882dbeae3e3d25fd0cb725f3b1a54da75ee6c /drivers/i2c
parent0857ba3c24c308f42a242fe8a1894772750230ce (diff)
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>
Diffstat (limited to 'drivers/i2c')
-rw-r--r--drivers/i2c/busses/i2c-s3c2410.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/i2c/busses/i2c-s3c2410.c b/drivers/i2c/busses/i2c-s3c2410.c
index 081e261ac847..16592e5ab08a 100644
--- a/drivers/i2c/busses/i2c-s3c2410.c
+++ b/drivers/i2c/busses/i2c-s3c2410.c
@@ -856,6 +856,7 @@ static int s3c24xx_i2c_parse_dt_gpio(struct s3c24xx_i2c *i2c)
856 dev_err(i2c->dev, "invalid gpio[%d]: %d\n", idx, gpio); 856 dev_err(i2c->dev, "invalid gpio[%d]: %d\n", idx, gpio);
857 goto free_gpio; 857 goto free_gpio;
858 } 858 }
859 i2c->gpios[idx] = gpio;
859 860
860 ret = gpio_request(gpio, "i2c-bus"); 861 ret = gpio_request(gpio, "i2c-bus");
861 if (ret) { 862 if (ret) {