Skip to contentSkip to conversation

ASoC: fsl_ssi: Fix irq error check

PATCH Applied Fabio Estevam 2 participants 2 messages Jan 7, 2015 – Jan 8, 2015

Subsystems (3)
lore
Share & tools
lore

Fabio Estevam

author reviewer
#0 lore raw

PATCH 1/1 ASoC: fsl_ssi: Fix irq error check

From: Fabio Estevam <[email protected]>

Commit 2ffa531078037a0 ("ASoC: fsl_ssi: Fix module unbound") changed the way to retrieve the irq number from irq_of_parse_and_map() to platform_get_irq(), but missed to updated the irq error check accordingly.

We should test for negative irq number and propagate it in the case of error.

---
 sound/soc/fsl/fsl_ssi.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
sound/soc/fsl/fsl_ssi.c +2 -2
index a65f17d..059496e 100644
@@ -1362,9 +1362,9 @@ 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", np->full_name);
-		return -ENXIO;
+		return ssi_private->irq;
 	}
 
 	/* Are the RX and the TX clocks locked? */
Signature · 1 line
1.9.1
maintainer Applied
#1 lore raw
Quoted 5 lines · Fabio Estevam

From: Fabio Estevam <[email protected]>

Commit 2ffa531078037a0 ("ASoC: fsl_ssi: Fix module unbound") changed the way to retrieve the irq number from irq_of_parse_and_map() to platform_get_irq(), but missed to updated the irq error check accordingly.

Applied, thanks.