diff mbox

ASoC: fsl_ssi: Fix platform_get_irq() error handling

Message ID 1429067295-16052-1-git-send-email-festevam@gmail.com (mailing list archive)
State Accepted
Commit 28ecc0b658e2ac882faa80e7ff1d72d144299bd0
Headers show

Commit Message

Fabio Estevam April 15, 2015, 3:08 a.m. UTC
From: Fabio Estevam <fabio.estevam@freescale.com>

We should check whether platform_get_irq() returns a negative number and
propagate the error in this case.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
---
 sound/soc/fsl/fsl_ssi.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Mark Brown April 17, 2015, 1:17 p.m. UTC | #1
On Wed, Apr 15, 2015 at 12:08:15AM -0300, Fabio Estevam wrote:
> From: Fabio Estevam <fabio.estevam@freescale.com>
> 
> We should check whether platform_get_irq() returns a negative number and
> propagate the error in this case.

Applied, thanks.
diff mbox

Patch

diff --git a/sound/soc/fsl/fsl_ssi.c b/sound/soc/fsl/fsl_ssi.c
index e8bb8ee..0d48804 100644
--- a/sound/soc/fsl/fsl_ssi.c
+++ b/sound/soc/fsl/fsl_ssi.c
@@ -1357,7 +1357,7 @@  static int fsl_ssi_probe(struct platform_device *pdev)
 	}
 
 	ssi_private->irq = platform_get_irq(pdev, 0);
-	if (!ssi_private->irq) {
+	if (ssi_private->irq < 0) {
 		dev_err(&pdev->dev, "no irq for node %s\n", pdev->name);
 		return ssi_private->irq;
 	}