Skip to content

Commit

Permalink
ASoC: imx-ssi: add check on platform_get_irq return value
Browse files Browse the repository at this point in the history
Check return value from call to platform_get_irq(),
so in case of failure print error message and propagate
the return value.

Signed-off-by: Gustavo A. R. Silva <garsilva@embeddedor.com>
Acked-by: Nicolin Chen <nicoleotsuka@gmail.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
  • Loading branch information
Gustavo A. R. Silva authored and Mark Brown committed Jul 7, 2017
1 parent b821d29 commit ae1fbdf
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions sound/soc/fsl/imx-ssi.c
Original file line number Diff line number Diff line change
Expand Up @@ -527,6 +527,10 @@ static int imx_ssi_probe(struct platform_device *pdev)
}

ssi->irq = platform_get_irq(pdev, 0);
if (ssi->irq < 0) {
dev_err(&pdev->dev, "Failed to get IRQ: %d\n", ssi->irq);
return ssi->irq;
}

ssi->clk = devm_clk_get(&pdev->dev, NULL);
if (IS_ERR(ssi->clk)) {
Expand Down

0 comments on commit ae1fbdf

Please sign in to comment.