2
0
mirror of https://github.com/edk2-porting/linux-next.git synced 2024-12-21 19:53:59 +08:00

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 <fabio.estevam@freescale.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
This commit is contained in:
Fabio Estevam 2013-07-17 02:00:39 -03:00 committed by Mark Brown
parent b0a4747a5d
commit ede32d3a23

View 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