aboutsummaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorThomas White <taw@bitwiz.org.uk>2009-08-04 21:48:16 +0100
committerThomas White <taw@bitwiz.org.uk>2009-08-04 21:48:16 +0100
commitbd99667512b32eb4a765d96940b00e0f2eb80ae5 (patch)
treef720e1b0c574d2cef8f522d7340fd1cde23997f9 /drivers
parentf3f88c9cd448361f2e96023894fe2b4701488dd4 (diff)
Tidy up initialisation
Fix label usage, making a compiler warning go away in the process. Signed-off-by: Thomas White <taw@bitwiz.org.uk>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/mfd/glamo/glamo-drm-drv.c24
1 files changed, 8 insertions, 16 deletions
diff --git a/drivers/mfd/glamo/glamo-drm-drv.c b/drivers/mfd/glamo/glamo-drm-drv.c
index 23b08b8df40..11634e4ed63 100644
--- a/drivers/mfd/glamo/glamo-drm-drv.c
+++ b/drivers/mfd/glamo/glamo-drm-drv.c
@@ -239,14 +239,14 @@ static int glamodrm_probe(struct platform_device *pdev)
if ( !gdrm->cmdq ) {
dev_err(&pdev->dev, "Unable to find command queue.\n");
rc = -ENOENT;
- goto out_unmap_vram;
+ goto out_unmap_regs;
}
gdrm->cmdq = request_mem_region(gdrm->cmdq->start,
RESSIZE(gdrm->cmdq), pdev->name);
if ( !gdrm->cmdq ) {
dev_err(&pdev->dev, "failed to request command queue region\n");
rc = -ENOENT;
- goto out_unmap_vram;
+ goto out_unmap_regs;
}
gdrm->cmdq_base = ioremap(gdrm->cmdq->start, RESSIZE(gdrm->cmdq));
if ( !gdrm->cmdq_base ) {
@@ -260,40 +260,34 @@ static int glamodrm_probe(struct platform_device *pdev)
if ( !gdrm->vram ) {
dev_err(&pdev->dev, "Unable to find VRAM.\n");
rc = -ENOENT;
- goto out_unmap_regs;
+ goto out_unmap_cmdq;
}
gdrm->vram = request_mem_region(gdrm->vram->start,
RESSIZE(gdrm->vram), pdev->name);
if ( !gdrm->vram ) {
dev_err(&pdev->dev, "failed to request VRAM region\n");
rc = -ENOENT;
- goto out_unmap_regs;
+ goto out_unmap_cmdq;
}
-// gdrm->vram_base = ioremap(gdrm->vram->start, RESSIZE(gdrm->vram));
-// if ( !gdrm->vram_base ) {
-// dev_err(&pdev->dev, "failed to ioremap() VRAM\n");
-// rc = -ENOENT;
-// goto out_release_vram;
-// }
/* Find the LCD controller */
gdrm->lcd_regs = platform_get_resource(pdev, IORESOURCE_MEM, 3);
if ( !gdrm->lcd_regs ) {
dev_err(&pdev->dev, "Unable to find LCD registers.\n");
rc = -ENOENT;
- goto out_unmap_cmdq;
+ goto out_release_vram;
}
gdrm->lcd_regs = request_mem_region(gdrm->lcd_regs->start,
RESSIZE(gdrm->lcd_regs),
pdev->name);
if ( !gdrm->lcd_regs ) {
- dev_err(&pdev->dev, "failed to request VRAM region\n");
+ dev_err(&pdev->dev, "failed to request LCD registers\n");
rc = -ENOENT;
- goto out_release_lcd;
+ goto out_release_vram;
}
gdrm->lcd_base = ioremap(gdrm->lcd_regs->start, RESSIZE(gdrm->lcd_regs));
if ( !gdrm->lcd_base ) {
- dev_err(&pdev->dev, "failed to ioremap() VRAM\n");
+ dev_err(&pdev->dev, "failed to ioremap() LCD registers\n");
rc = -ENOENT;
goto out_release_lcd;
}
@@ -313,8 +307,6 @@ out_unmap_cmdq:
iounmap(gdrm->cmdq_base);
out_release_cmdq:
release_mem_region(gdrm->cmdq->start, RESSIZE(gdrm->cmdq));
-out_unmap_vram:
-// iounmap(gdrm->vram_base);
out_release_vram:
release_mem_region(gdrm->vram->start, RESSIZE(gdrm->vram));
out_unmap_regs: