Skip to content

Commit

Permalink
ASoC: fsl: fsl_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 Jul 17, 2013
1 parent b0a4747 commit ede32d3
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion sound/soc/fsl/fsl_ssi.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit ede32d3

Please sign in to comment.