linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] ASoC: imx-ssi: add check on platform_get_irq return value
@ 2017-06-30 22:17 Gustavo A. R. Silva
  2017-07-01  4:51 ` Nicolin Chen
  2017-07-07 12:51 ` Applied "ASoC: imx-ssi: add check on platform_get_irq return value" to the asoc tree Mark Brown
  0 siblings, 2 replies; 3+ messages in thread
From: Gustavo A. R. Silva @ 2017-06-30 22:17 UTC (permalink / raw)
  To: Timur Tabi, Nicolin Chen, Xiubo Li, Fabio Estevam, Liam Girdwood,
	Mark Brown, Jaroslav Kysela, Takashi Iwai
  Cc: alsa-devel, linuxppc-dev, linux-kernel, Gustavo A. R. Silva

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>
---
 sound/soc/fsl/imx-ssi.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/sound/soc/fsl/imx-ssi.c b/sound/soc/fsl/imx-ssi.c
index b95132e..0679061 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)) {
-- 
2.5.0

^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2017-07-07 13:47 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-06-30 22:17 [PATCH] ASoC: imx-ssi: add check on platform_get_irq return value Gustavo A. R. Silva
2017-07-01  4:51 ` Nicolin Chen
2017-07-07 12:51 ` Applied "ASoC: imx-ssi: add check on platform_get_irq return value" to the asoc tree Mark Brown

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).