diff options
author | Gustavo A. R. Silva <garsilva@embeddedor.com> | 2017-06-30 18:17:35 -0400 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2017-07-07 08:50:43 -0400 |
commit | ae1fbdff6dbcdfee9daee69fa1e7d26d1f31d1c7 (patch) | |
tree | 1c42f6fb3fb65ccaf0720f0cdac42a9ef2c1d049 | |
parent | b821d298f8864dc3c3d42643812df43289159507 (diff) |
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>
-rw-r--r-- | sound/soc/fsl/imx-ssi.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/sound/soc/fsl/imx-ssi.c b/sound/soc/fsl/imx-ssi.c index b95132e2f9dc..06790615e04e 100644 --- a/sound/soc/fsl/imx-ssi.c +++ b/sound/soc/fsl/imx-ssi.c | |||
@@ -527,6 +527,10 @@ static int imx_ssi_probe(struct platform_device *pdev) | |||
527 | } | 527 | } |
528 | 528 | ||
529 | ssi->irq = platform_get_irq(pdev, 0); | 529 | ssi->irq = platform_get_irq(pdev, 0); |
530 | if (ssi->irq < 0) { | ||
531 | dev_err(&pdev->dev, "Failed to get IRQ: %d\n", ssi->irq); | ||
532 | return ssi->irq; | ||
533 | } | ||
530 | 534 | ||
531 | ssi->clk = devm_clk_get(&pdev->dev, NULL); | 535 | ssi->clk = devm_clk_get(&pdev->dev, NULL); |
532 | if (IS_ERR(ssi->clk)) { | 536 | if (IS_ERR(ssi->clk)) { |