summaryrefslogtreecommitdiff
path: root/sound/soc
diff options
context:
space:
mode:
authorGustavo A. R. Silva <garsilva@embeddedor.com>2017-06-30 17:17:35 -0500
committerMark Brown <broonie@kernel.org>2017-07-07 13:50:43 +0100
commitae1fbdff6dbcdfee9daee69fa1e7d26d1f31d1c7 (patch)
tree1c42f6fb3fb65ccaf0720f0cdac42a9ef2c1d049 /sound/soc
parentb821d298f8864dc3c3d42643812df43289159507 (diff)
downloadlwn-ae1fbdff6dbcdfee9daee69fa1e7d26d1f31d1c7.tar.gz
lwn-ae1fbdff6dbcdfee9daee69fa1e7d26d1f31d1c7.zip
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>
Diffstat (limited to 'sound/soc')
-rw-r--r--sound/soc/fsl/imx-ssi.c4
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)
}
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)) {