diff options
author | Fabio Estevam <fabio.estevam@freescale.com> | 2013-07-17 01:00:39 -0400 |
---|---|---|
committer | Mark Brown <broonie@linaro.org> | 2013-07-17 06:03:54 -0400 |
commit | ede32d3a237e102884cd5b223aba9afe3e6fb679 (patch) | |
tree | 4e944046568b2a0b284e0d192c9df83648eec53f | |
parent | b0a4747a5d6498d37ebb6e4ce53dd5d89c51ab51 (diff) |
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>
-rw-r--r-- | sound/soc/fsl/fsl_ssi.c | 7 |
1 files changed, 6 insertions, 1 deletions
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) | |||
737 | dev_err(&pdev->dev, "could not get clock: %d\n", ret); | 737 | dev_err(&pdev->dev, "could not get clock: %d\n", ret); |
738 | goto error_irqmap; | 738 | goto error_irqmap; |
739 | } | 739 | } |
740 | clk_prepare_enable(ssi_private->clk); | 740 | ret = clk_prepare_enable(ssi_private->clk); |
741 | if (ret) { | ||
742 | dev_err(&pdev->dev, "clk_prepare_enable failed: %d\n", | ||
743 | ret); | ||
744 | goto error_irqmap; | ||
745 | } | ||
741 | 746 | ||
742 | /* | 747 | /* |
743 | * We have burstsize be "fifo_depth - 2" to match the SSI | 748 | * We have burstsize be "fifo_depth - 2" to match the SSI |