aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
Diffstat (limited to 'arch')
-rw-r--r--arch/arm/mach-omap1/dma.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/arch/arm/mach-omap1/dma.c b/arch/arm/mach-omap1/dma.c
index d8559344c6e2..f5a52204b89f 100644
--- a/arch/arm/mach-omap1/dma.c
+++ b/arch/arm/mach-omap1/dma.c
@@ -284,14 +284,15 @@ static int __init omap1_system_dma_init(void)
284 dma_base = ioremap(res[0].start, resource_size(&res[0])); 284 dma_base = ioremap(res[0].start, resource_size(&res[0]));
285 if (!dma_base) { 285 if (!dma_base) {
286 pr_err("%s: Unable to ioremap\n", __func__); 286 pr_err("%s: Unable to ioremap\n", __func__);
287 return -ENODEV; 287 ret = -ENODEV;
288 goto exit_device_put;
288 } 289 }
289 290
290 ret = platform_device_add_resources(pdev, res, ARRAY_SIZE(res)); 291 ret = platform_device_add_resources(pdev, res, ARRAY_SIZE(res));
291 if (ret) { 292 if (ret) {
292 dev_err(&pdev->dev, "%s: Unable to add resources for %s%d\n", 293 dev_err(&pdev->dev, "%s: Unable to add resources for %s%d\n",
293 __func__, pdev->name, pdev->id); 294 __func__, pdev->name, pdev->id);
294 goto exit_device_del; 295 goto exit_device_put;
295 } 296 }
296 297
297 p = kzalloc(sizeof(struct omap_system_dma_plat_info), GFP_KERNEL); 298 p = kzalloc(sizeof(struct omap_system_dma_plat_info), GFP_KERNEL);
@@ -299,7 +300,7 @@ static int __init omap1_system_dma_init(void)
299 dev_err(&pdev->dev, "%s: Unable to allocate 'p' for %s\n", 300 dev_err(&pdev->dev, "%s: Unable to allocate 'p' for %s\n",
300 __func__, pdev->name); 301 __func__, pdev->name);
301 ret = -ENOMEM; 302 ret = -ENOMEM;
302 goto exit_device_put; 303 goto exit_device_del;
303 } 304 }
304 305
305 d = kzalloc(sizeof(struct omap_dma_dev_attr), GFP_KERNEL); 306 d = kzalloc(sizeof(struct omap_dma_dev_attr), GFP_KERNEL);
@@ -380,10 +381,10 @@ exit_release_d:
380 kfree(d); 381 kfree(d);
381exit_release_p: 382exit_release_p:
382 kfree(p); 383 kfree(p);
383exit_device_put:
384 platform_device_put(pdev);
385exit_device_del: 384exit_device_del:
386 platform_device_del(pdev); 385 platform_device_del(pdev);
386exit_device_put:
387 platform_device_put(pdev);
387 388
388 return ret; 389 return ret;
389} 390}