Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 251835
b: refs/heads/master
c: 7529b70
h: refs/heads/master
i:
  251833: e629a20
  251831: 2f8e277
v: v3
  • Loading branch information
omar ramirez authored and Tony Lindgren committed May 3, 2011
1 parent 40c4713 commit 1e1bd43
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 32 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 11383a9bcc213cd2b55e2aef863ef2a8b3d7b62c
refs/heads/master: 7529b703869d59e799a0c0eb4f3df7a418f7dc99
34 changes: 16 additions & 18 deletions trunk/arch/arm/mach-omap2/omap_l3_noc.c
Original file line number Diff line number Diff line change
Expand Up @@ -132,49 +132,49 @@ static int __init omap4_l3_probe(struct platform_device *pdev)

l3 = kzalloc(sizeof(*l3), GFP_KERNEL);
if (!l3)
ret = -ENOMEM;
return -ENOMEM;

platform_set_drvdata(pdev, l3);
res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
if (!res) {
dev_err(&pdev->dev, "couldn't find resource 0\n");
ret = -ENODEV;
goto err1;
goto err0;
}

l3->l3_base[0] = ioremap(res->start, resource_size(res));
if (!(l3->l3_base[0])) {
dev_err(&pdev->dev, "ioremap failed\n");
ret = -ENOMEM;
goto err2;
goto err0;
}

res = platform_get_resource(pdev, IORESOURCE_MEM, 1);
if (!res) {
dev_err(&pdev->dev, "couldn't find resource 1\n");
ret = -ENODEV;
goto err3;
goto err1;
}

l3->l3_base[1] = ioremap(res->start, resource_size(res));
if (!(l3->l3_base[1])) {
dev_err(&pdev->dev, "ioremap failed\n");
ret = -ENOMEM;
goto err4;
goto err1;
}

res = platform_get_resource(pdev, IORESOURCE_MEM, 2);
if (!res) {
dev_err(&pdev->dev, "couldn't find resource 2\n");
ret = -ENODEV;
goto err5;
goto err2;
}

l3->l3_base[2] = ioremap(res->start, resource_size(res));
if (!(l3->l3_base[2])) {
dev_err(&pdev->dev, "ioremap failed\n");
ret = -ENOMEM;
goto err6;
goto err2;
}

/*
Expand All @@ -187,7 +187,7 @@ static int __init omap4_l3_probe(struct platform_device *pdev)
if (ret) {
pr_crit("L3: request_irq failed to register for 0x%x\n",
OMAP44XX_IRQ_L3_DBG);
goto err7;
goto err3;
}
l3->debug_irq = irq;

Expand All @@ -198,24 +198,22 @@ static int __init omap4_l3_probe(struct platform_device *pdev)
if (ret) {
pr_crit("L3: request_irq failed to register for 0x%x\n",
OMAP44XX_IRQ_L3_APP);
goto err8;
goto err4;
}
l3->app_irq = irq;

goto err0;
err8:
err7:
iounmap(l3->l3_base[2]);
err6:
err5:
iounmap(l3->l3_base[1]);
return 0;

err4:
free_irq(l3->debug_irq, l3);
err3:
iounmap(l3->l3_base[0]);
iounmap(l3->l3_base[2]);
err2:
iounmap(l3->l3_base[1]);
err1:
kfree(l3);
iounmap(l3->l3_base[0]);
err0:
kfree(l3);
return ret;
}

Expand Down
23 changes: 10 additions & 13 deletions trunk/arch/arm/mach-omap2/omap_l3_smx.c
Original file line number Diff line number Diff line change
Expand Up @@ -228,24 +228,22 @@ static int __init omap3_l3_probe(struct platform_device *pdev)
int ret;

l3 = kzalloc(sizeof(*l3), GFP_KERNEL);
if (!l3) {
ret = -ENOMEM;
goto err0;
}
if (!l3)
return -ENOMEM;

platform_set_drvdata(pdev, l3);

res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
if (!res) {
dev_err(&pdev->dev, "couldn't find resource\n");
ret = -ENODEV;
goto err1;
goto err0;
}
l3->rt = ioremap(res->start, resource_size(res));
if (!(l3->rt)) {
dev_err(&pdev->dev, "ioremap failed\n");
ret = -ENOMEM;
goto err2;
goto err0;
}

l3->debug_irq = platform_get_irq(pdev, 0);
Expand All @@ -254,7 +252,7 @@ static int __init omap3_l3_probe(struct platform_device *pdev)
"l3-debug-irq", l3);
if (ret) {
dev_err(&pdev->dev, "couldn't request debug irq\n");
goto err3;
goto err1;
}

l3->app_irq = platform_get_irq(pdev, 1);
Expand All @@ -264,18 +262,17 @@ static int __init omap3_l3_probe(struct platform_device *pdev)

if (ret) {
dev_err(&pdev->dev, "couldn't request app irq\n");
goto err4;
goto err2;
}

goto err0;
return 0;

err4:
err3:
iounmap(l3->rt);
err2:
free_irq(l3->debug_irq, l3);
err1:
kfree(l3);
iounmap(l3->rt);
err0:
kfree(l3);
return ret;
}

Expand Down

0 comments on commit 1e1bd43

Please sign in to comment.