summaryrefslogtreecommitdiff
path: root/drivers/staging/imx-drm
diff options
context:
space:
mode:
authorFabio Estevam <fabio.estevam@freescale.com>2013-07-21 01:22:09 +0400
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2013-07-26 00:35:49 +0400
commitbe798b2b13bca5a1b25b56acec60ec42bcc57c50 (patch)
tree13a1b1e8c382c1064b05331a864f04046009b053 /drivers/staging/imx-drm
parent7c3836a48e318ef8676f43af6632db3f89bf8cc1 (diff)
downloadlinux-be798b2b13bca5a1b25b56acec60ec42bcc57c50.tar.xz
imx-drm: ipu-common: Simplify the error path
Instead of jumping to goto labels, just return the error code directly. Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com> Acked-by: Sascha Hauer <s.hauer@pengutronix.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/imx-drm')
-rw-r--r--drivers/staging/imx-drm/ipu-v3/ipu-common.c10
1 files changed, 3 insertions, 7 deletions
diff --git a/drivers/staging/imx-drm/ipu-v3/ipu-common.c b/drivers/staging/imx-drm/ipu-v3/ipu-common.c
index e35d0bf03c7b..d06b0c81f397 100644
--- a/drivers/staging/imx-drm/ipu-v3/ipu-common.c
+++ b/drivers/staging/imx-drm/ipu-v3/ipu-common.c
@@ -1075,16 +1075,14 @@ static int ipu_probe(struct platform_device *pdev)
ipu->cpmem_base = devm_ioremap(&pdev->dev,
ipu_base + devtype->cpmem_ofs, PAGE_SIZE);
- if (!ipu->cm_reg || !ipu->idmac_reg || !ipu->cpmem_base) {
- ret = -ENOMEM;
- goto failed_ioremap;
- }
+ if (!ipu->cm_reg || !ipu->idmac_reg || !ipu->cpmem_base)
+ return -ENOMEM;
ipu->clk = devm_clk_get(&pdev->dev, "bus");
if (IS_ERR(ipu->clk)) {
ret = PTR_ERR(ipu->clk);
dev_err(&pdev->dev, "clk_get failed with %d", ret);
- goto failed_clk_get;
+ return ret;
}
platform_set_drvdata(pdev, ipu);
@@ -1134,8 +1132,6 @@ out_failed_reset:
ipu_irq_exit(ipu);
out_failed_irq:
clk_disable_unprepare(ipu->clk);
-failed_clk_get:
-failed_ioremap:
return ret;
}