imx-drm: ipu-di: Check the return value from clk_prepare_enable()
authorFabio Estevam <fabio.estevam@freescale.com>
Mon, 19 Aug 2013 00:40:02 +0000 (21:40 -0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 19 Aug 2013 22:38:02 +0000 (15:38 -0700)
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>
drivers/staging/imx-drm/ipu-v3/ipu-di.c

index 0b6806e2069c3705afe13da8315871c407757ffb..948a49b289ef171036d3f39e8ac0eb6392e59b3e 100644 (file)
@@ -654,7 +654,9 @@ EXPORT_SYMBOL_GPL(ipu_di_init_sync_panel);
 
 int ipu_di_enable(struct ipu_di *di)
 {
-       clk_prepare_enable(di->clk_di_pixel);
+       int ret = clk_prepare_enable(di->clk_di_pixel);
+       if (ret)
+               return ret;
 
        ipu_module_enable(di->ipu, di->module);