diff options
author | Axel Lin <axel.lin@gmail.com> | 2010-08-03 01:44:00 -0400 |
---|---|---|
committer | Samuel Ortiz <sameo@linux.intel.com> | 2010-08-12 05:28:05 -0400 |
commit | 08b877b80f286e86a0034b460ac15b09f67da8a7 (patch) | |
tree | b9c8b448780d5e425074676c4d1368c54c000624 /drivers/mfd | |
parent | fa6e4b181c57ae8b18758840b8a8545b3bb1f1d9 (diff) |
mfd: Fix tc6387xb resource reclaim
This patch includes below fixes:
1. add a missing iounmap in tc6387xb_probe() error path
2. fix resource reclaim in tc6387xb_remove()
Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
Diffstat (limited to 'drivers/mfd')
-rw-r--r-- | drivers/mfd/tc6387xb.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/drivers/mfd/tc6387xb.c b/drivers/mfd/tc6387xb.c index 517f9bcdeaac..1bc71da5278c 100644 --- a/drivers/mfd/tc6387xb.c +++ b/drivers/mfd/tc6387xb.c | |||
@@ -201,6 +201,7 @@ static int tc6387xb_probe(struct platform_device *dev) | |||
201 | if (!ret) | 201 | if (!ret) |
202 | return 0; | 202 | return 0; |
203 | 203 | ||
204 | iounmap(tc6387xb->scr); | ||
204 | err_ioremap: | 205 | err_ioremap: |
205 | release_resource(&tc6387xb->rscr); | 206 | release_resource(&tc6387xb->rscr); |
206 | err_resource: | 207 | err_resource: |
@@ -213,12 +214,15 @@ err_no_irq: | |||
213 | 214 | ||
214 | static int tc6387xb_remove(struct platform_device *dev) | 215 | static int tc6387xb_remove(struct platform_device *dev) |
215 | { | 216 | { |
216 | struct clk *clk32k = platform_get_drvdata(dev); | 217 | struct tc6387xb *tc6387xb = platform_get_drvdata(dev); |
217 | 218 | ||
218 | mfd_remove_devices(&dev->dev); | 219 | mfd_remove_devices(&dev->dev); |
219 | clk_disable(clk32k); | 220 | iounmap(tc6387xb->scr); |
220 | clk_put(clk32k); | 221 | release_resource(&tc6387xb->rscr); |
222 | clk_disable(tc6387xb->clk32k); | ||
223 | clk_put(tc6387xb->clk32k); | ||
221 | platform_set_drvdata(dev, NULL); | 224 | platform_set_drvdata(dev, NULL); |
225 | kfree(tc6387xb); | ||
222 | 226 | ||
223 | return 0; | 227 | return 0; |
224 | } | 228 | } |