diff options
author | Axel Lin <axel.lin@gmail.com> | 2010-08-03 13:44:00 +0800 |
---|---|---|
committer | Samuel Ortiz <sameo@linux.intel.com> | 2010-08-12 11:28:05 +0200 |
commit | 08b877b80f286e86a0034b460ac15b09f67da8a7 (patch) | |
tree | b9c8b448780d5e425074676c4d1368c54c000624 /drivers/mfd/tc6387xb.c | |
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/tc6387xb.c')
-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) if (!ret) return 0; + iounmap(tc6387xb->scr); err_ioremap: release_resource(&tc6387xb->rscr); err_resource: @@ -213,12 +214,15 @@ err_no_irq: static int tc6387xb_remove(struct platform_device *dev) { - struct clk *clk32k = platform_get_drvdata(dev); + struct tc6387xb *tc6387xb = platform_get_drvdata(dev); mfd_remove_devices(&dev->dev); - clk_disable(clk32k); - clk_put(clk32k); + iounmap(tc6387xb->scr); + release_resource(&tc6387xb->rscr); + clk_disable(tc6387xb->clk32k); + clk_put(tc6387xb->clk32k); platform_set_drvdata(dev, NULL); + kfree(tc6387xb); return 0; } |