imx-drm: ipu-common: Check the return value from clk_prepare_enable()

clk_prepare_enable() may fail, so let's check its return value and propagate it
in the case of error.

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>
This commit is contained in:
Fabio Estevam 2013-07-20 18:22:10 -03:00 committed by Greg Kroah-Hartman
parent be798b2b13
commit 62645a27ba

View File

@ -1087,7 +1087,11 @@ static int ipu_probe(struct platform_device *pdev)
platform_set_drvdata(pdev, ipu);
clk_prepare_enable(ipu->clk);
ret = clk_prepare_enable(ipu->clk);
if (ret) {
dev_err(&pdev->dev, "clk_prepare_enable failed: %d\n", ret);
return ret;
}
ipu->dev = &pdev->dev;
ipu->irq_sync = irq_sync;