* [PATCH] mfd: da9052: Add missing regmap_exit to free a previously allocated register map
@ 2012-01-10 7:09 Axel Lin
2012-02-20 10:53 ` Samuel Ortiz
0 siblings, 1 reply; 2+ messages in thread
From: Axel Lin @ 2012-01-10 7:09 UTC (permalink / raw)
To: linux-kernel; +Cc: David Dajun Chen, Ashish Jangam, Mark Brown, Samuel Ortiz
Signed-off-by: Axel Lin <axel.lin@gmail.com>
---
drivers/mfd/da9052-i2c.c | 7 +++++--
drivers/mfd/da9052-spi.c | 5 ++++-
2 files changed, 9 insertions(+), 3 deletions(-)
diff --git a/drivers/mfd/da9052-i2c.c b/drivers/mfd/da9052-i2c.c
index 44b97c7..fdc2c6a 100644
--- a/drivers/mfd/da9052-i2c.c
+++ b/drivers/mfd/da9052-i2c.c
@@ -74,14 +74,16 @@ static int __devinit da9052_i2c_probe(struct i2c_client *client,
ret = da9052_i2c_enable_multiwrite(da9052);
if (ret < 0)
- goto err;
+ goto err_regmap;
ret = da9052_device_init(da9052, id->driver_data);
if (ret != 0)
- goto err;
+ goto err_regmap;
return 0;
+err_regmap:
+ regmap_exit(da9052->regmap);
err:
kfree(da9052);
return ret;
@@ -92,6 +94,7 @@ static int da9052_i2c_remove(struct i2c_client *client)
struct da9052 *da9052 = i2c_get_clientdata(client);
da9052_device_exit(da9052);
+ regmap_exit(da9052->regmap);
kfree(da9052);
return 0;
diff --git a/drivers/mfd/da9052-spi.c b/drivers/mfd/da9052-spi.c
index cdbc7ca..76bb9ea08 100644
--- a/drivers/mfd/da9052-spi.c
+++ b/drivers/mfd/da9052-spi.c
@@ -52,10 +52,12 @@ static int da9052_spi_probe(struct spi_device *spi)
ret = da9052_device_init(da9052, id->driver_data);
if (ret != 0)
- goto err;
+ goto err_regmap;
return 0;
+err_regmap:
+ regmap_exit(da9052->regmap);
err:
kfree(da9052);
return ret;
@@ -66,6 +68,7 @@ static int da9052_spi_remove(struct spi_device *spi)
struct da9052 *da9052 = dev_get_drvdata(&spi->dev);
da9052_device_exit(da9052);
+ regmap_exit(da9052->regmap);
kfree(da9052);
return 0;
--
1.7.5.4
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] mfd: da9052: Add missing regmap_exit to free a previously allocated register map
2012-01-10 7:09 [PATCH] mfd: da9052: Add missing regmap_exit to free a previously allocated register map Axel Lin
@ 2012-02-20 10:53 ` Samuel Ortiz
0 siblings, 0 replies; 2+ messages in thread
From: Samuel Ortiz @ 2012-02-20 10:53 UTC (permalink / raw)
To: Axel Lin; +Cc: linux-kernel, David Dajun Chen, Ashish Jangam, Mark Brown
Hi Axel,
On Tue, Jan 10, 2012 at 03:09:56PM +0800, Axel Lin wrote:
> Signed-off-by: Axel Lin <axel.lin@gmail.com>
Thanks, patch applied.
Cheers,
Samuel.
--
Intel Open Source Technology Centre
http://oss.intel.com/
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2012-02-20 10:46 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-01-10 7:09 [PATCH] mfd: da9052: Add missing regmap_exit to free a previously allocated register map Axel Lin
2012-02-20 10:53 ` Samuel Ortiz
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).