ASoC: fsl: fsl_ssi: Check the return value from clk_prepare_enable()
authorFabio Estevam <fabio.estevam@freescale.com>
Wed, 17 Jul 2013 05:00:39 +0000 (02:00 -0300)
committerMark Brown <broonie@linaro.org>
Wed, 17 Jul 2013 10:03:54 +0000 (11:03 +0100)
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>
Signed-off-by: Mark Brown <broonie@linaro.org>
sound/soc/fsl/fsl_ssi.c

index d078b1b..c9974a4 100644 (file)
@@ -737,7 +737,12 @@ static int fsl_ssi_probe(struct platform_device *pdev)
                        dev_err(&pdev->dev, "could not get clock: %d\n", ret);
                        goto error_irqmap;
                }
-               clk_prepare_enable(ssi_private->clk);
+               ret = clk_prepare_enable(ssi_private->clk);
+               if (ret) {
+                       dev_err(&pdev->dev, "clk_prepare_enable failed: %d\n",
+                               ret);
+                       goto error_irqmap;
+               }
 
                /*
                 * We have burstsize be "fifo_depth - 2" to match the SSI