Skip to content

Commit

Permalink
ASoC: imx-ssi: Check the return value from clk_prepare_enable()
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Fabio Estevam authored and Mark Brown committed Dec 5, 2013
1 parent 07a9483 commit 24f4bd5
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion sound/soc/fsl/imx-ssi.c
Original file line number Diff line number Diff line change
Expand Up @@ -535,7 +535,9 @@ static int imx_ssi_probe(struct platform_device *pdev)
ret);
goto failed_clk;
}
clk_prepare_enable(ssi->clk);
ret = clk_prepare_enable(ssi->clk);
if (ret)
goto failed_clk;

res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
ssi->base = devm_ioremap_resource(&pdev->dev, res);
Expand Down

0 comments on commit 24f4bd5

Please sign in to comment.