Commit be798b2b authored by Fabio Estevam's avatar Fabio Estevam Committed by Greg Kroah-Hartman

imx-drm: ipu-common: Simplify the error path

Instead of jumping to goto labels, just return the error code directly.
Signed-off-by: default avatarFabio Estevam <fabio.estevam@freescale.com>
Acked-by: default avatarSascha Hauer <s.hauer@pengutronix.de>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 7c3836a4
...@@ -1075,16 +1075,14 @@ static int ipu_probe(struct platform_device *pdev) ...@@ -1075,16 +1075,14 @@ static int ipu_probe(struct platform_device *pdev)
ipu->cpmem_base = devm_ioremap(&pdev->dev, ipu->cpmem_base = devm_ioremap(&pdev->dev,
ipu_base + devtype->cpmem_ofs, PAGE_SIZE); ipu_base + devtype->cpmem_ofs, PAGE_SIZE);
if (!ipu->cm_reg || !ipu->idmac_reg || !ipu->cpmem_base) { if (!ipu->cm_reg || !ipu->idmac_reg || !ipu->cpmem_base)
ret = -ENOMEM; return -ENOMEM;
goto failed_ioremap;
}
ipu->clk = devm_clk_get(&pdev->dev, "bus"); ipu->clk = devm_clk_get(&pdev->dev, "bus");
if (IS_ERR(ipu->clk)) { if (IS_ERR(ipu->clk)) {
ret = PTR_ERR(ipu->clk); ret = PTR_ERR(ipu->clk);
dev_err(&pdev->dev, "clk_get failed with %d", ret); dev_err(&pdev->dev, "clk_get failed with %d", ret);
goto failed_clk_get; return ret;
} }
platform_set_drvdata(pdev, ipu); platform_set_drvdata(pdev, ipu);
...@@ -1134,8 +1132,6 @@ static int ipu_probe(struct platform_device *pdev) ...@@ -1134,8 +1132,6 @@ static int ipu_probe(struct platform_device *pdev)
ipu_irq_exit(ipu); ipu_irq_exit(ipu);
out_failed_irq: out_failed_irq:
clk_disable_unprepare(ipu->clk); clk_disable_unprepare(ipu->clk);
failed_clk_get:
failed_ioremap:
return ret; return ret;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment