summaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-omap1
diff options
context:
space:
mode:
authorWei Yongjun <yongjun_wei@trendmicro.com.cn>2013-05-09 01:48:02 +0200
committerTony Lindgren <tony@atomide.com>2013-05-09 01:48:02 +0200
commit348c34225d4395b769ec6d283b0c7ace0b430a38 (patch)
treed540863cbc177ccef26875666ffea16ab85949b0 /arch/arm/mach-omap1
parentARM: OMAP2+: omap_device: use late_initcall_sync (diff)
downloadlinux-348c34225d4395b769ec6d283b0c7ace0b430a38.tar.xz
linux-348c34225d4395b769ec6d283b0c7ace0b430a38.zip
ARM: OMAP1: DMA: fix error handling in omap1_system_dma_init()
Add the missing iounmap() before return from omap1_system_dma_init() in the error handling case. Also removed platform_device_del() on add resources error case which cause dup device delete. Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn> Signed-off-by: Tony Lindgren <tony@atomide.com>
Diffstat (limited to 'arch/arm/mach-omap1')
-rw-r--r--arch/arm/mach-omap1/dma.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/arch/arm/mach-omap1/dma.c b/arch/arm/mach-omap1/dma.c
index 1a4e887f028d..68ab858e27b7 100644
--- a/arch/arm/mach-omap1/dma.c
+++ b/arch/arm/mach-omap1/dma.c
@@ -301,7 +301,7 @@ static int __init omap1_system_dma_init(void)
if (ret) {
dev_err(&pdev->dev, "%s: Unable to add resources for %s%d\n",
__func__, pdev->name, pdev->id);
- goto exit_device_put;
+ goto exit_iounmap;
}
p = kzalloc(sizeof(struct omap_system_dma_plat_info), GFP_KERNEL);
@@ -309,7 +309,7 @@ static int __init omap1_system_dma_init(void)
dev_err(&pdev->dev, "%s: Unable to allocate 'p' for %s\n",
__func__, pdev->name);
ret = -ENOMEM;
- goto exit_device_del;
+ goto exit_iounmap;
}
d = kzalloc(sizeof(struct omap_dma_dev_attr), GFP_KERNEL);
@@ -402,8 +402,8 @@ exit_release_d:
kfree(d);
exit_release_p:
kfree(p);
-exit_device_del:
- platform_device_del(pdev);
+exit_iounmap:
+ iounmap(dma_base);
exit_device_put:
platform_device_put(pdev);