public inbox for linuxppc-dev@ozlabs.org 
 help / color / mirror / Atom feed
From: "Gustavo A. R. Silva" <garsilva@embeddedor•com>
To: Timur Tabi <timur@tabi•org>,
	Nicolin Chen <nicoleotsuka@gmail•com>,
	Xiubo Li <Xiubo.Lee@gmail•com>,
	Fabio Estevam <fabio.estevam@nxp•com>,
	Liam Girdwood <lgirdwood@gmail•com>,
	Mark Brown <broonie@kernel•org>, Jaroslav Kysela <perex@perex•cz>,
	Takashi Iwai <tiwai@suse•com>
Cc: alsa-devel@alsa-project•org, linuxppc-dev@lists•ozlabs.org,
	linux-kernel@vger•kernel.org,
	"Gustavo A. R. Silva" <garsilva@embeddedor•com>
Subject: [PATCH] ASoC: imx-ssi: add check on platform_get_irq return value
Date: Fri, 30 Jun 2017 17:17:35 -0500	[thread overview]
Message-ID: <20170630221735.GA17951@embeddedgus> (raw)

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

             reply	other threads:[~2017-06-30 22:41 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-06-30 22:17 Gustavo A. R. Silva [this message]
2017-07-01  4:51 ` [PATCH] ASoC: imx-ssi: add check on platform_get_irq return value 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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20170630221735.GA17951@embeddedgus \
    --to=garsilva@embeddedor$(echo .)com \
    --cc=Xiubo.Lee@gmail$(echo .)com \
    --cc=alsa-devel@alsa-project$(echo .)org \
    --cc=broonie@kernel$(echo .)org \
    --cc=fabio.estevam@nxp$(echo .)com \
    --cc=lgirdwood@gmail$(echo .)com \
    --cc=linux-kernel@vger$(echo .)kernel.org \
    --cc=linuxppc-dev@lists$(echo .)ozlabs.org \
    --cc=nicoleotsuka@gmail$(echo .)com \
    --cc=perex@perex$(echo .)cz \
    --cc=timur@tabi$(echo .)org \
    --cc=tiwai@suse$(echo .)com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox