Skip to contentSkip to conversation

ASoC: fsl_ssi: Fix platform_get_irq() error handling

PATCH Applied Fabio Estevam 2 participants 2 messages Apr 15, 2015 – Apr 17, 2015

Subsystems (3)
lore
Share & tools
lore

Fabio Estevam

author reviewer
#0 lore raw

PATCH 1/1 ASoC: fsl_ssi: Fix platform_get_irq() error handling

From: Fabio Estevam <[email protected]>

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

---
 sound/soc/fsl/fsl_ssi.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
sound/soc/fsl/fsl_ssi.c +1 -1
index e8bb8ee..0d48804 100644
@@ -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;
 	}
Signature · 1 line
1.9.1
maintainer Applied
#1 lore raw
Quoted 4 lines · Fabio Estevam

From: Fabio Estevam <[email protected]>

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

Applied, thanks.