ASoC: imx-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 <fabio.estevam@freescale.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
This commit is contained in:
Fabio Estevam 2013-12-04 20:27:44 -02:00 committed by Mark Brown
parent 07a9483aac
commit 24f4bd57a7
1 changed files with 3 additions and 1 deletions

View File

@ -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);