From: Fabio Estevam Date: Wed, 17 Jul 2013 05:00:39 +0000 (-0300) Subject: ASoC: fsl: fsl_ssi: Check the return value from clk_prepare_enable() X-Git-Tag: firefly_0821_release~176^2~4889^2~170^2~3^2~28 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=ede32d3a237e102884cd5b223aba9afe3e6fb679;p=firefly-linux-kernel-4.4.55.git ASoC: fsl: fsl_ssi: 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 Signed-off-by: Mark Brown --- diff --git a/sound/soc/fsl/fsl_ssi.c b/sound/soc/fsl/fsl_ssi.c index d078b1ba08e8..c9974a4ac042 100644 --- a/sound/soc/fsl/fsl_ssi.c +++ b/sound/soc/fsl/fsl_ssi.c @@ -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