From: Fabio Estevam Date: Sat, 20 Jul 2013 21:22:10 +0000 (-0300) Subject: imx-drm: ipu-common: Check the return value from clk_prepare_enable() X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=62645a27ba9b93cf13d505d9ced64171010fb57d;p=linux-beck.git 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 --- 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;