From 62645a27ba9b93cf13d505d9ced64171010fb57d Mon Sep 17 00:00:00 2001 From: Fabio Estevam Date: Sat, 20 Jul 2013 18:22:10 -0300 Subject: [PATCH] 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 Acked-by: Sascha Hauer Signed-off-by: Greg Kroah-Hartman --- drivers/staging/imx-drm/ipu-v3/ipu-common.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/drivers/staging/imx-drm/ipu-v3/ipu-common.c b/drivers/staging/imx-drm/ipu-v3/ipu-common.c index d06b0c81f397..f1299da5ec20 100644 --- a/drivers/staging/imx-drm/ipu-v3/ipu-common.c +++ b/drivers/staging/imx-drm/ipu-v3/ipu-common.c @@ -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; -- 2.20.1