ASoC: imx-ssi: add check on platform_get_irq return value

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>
This commit is contained in:
Gustavo A. R. Silva 2017-06-30 17:17:35 -05:00 committed by Mark Brown
parent b821d298f8
commit ae1fbdff6d
1 changed files with 4 additions and 0 deletions

View File

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