Skip to contentSkip to conversation

ASoC: soc-jack: Fix checking return value of request_any_context_irq

PATCH Applied Axel Lin 2 participants 2 messages Aug 13, 2011 – Aug 15, 2011

Subsystems (2)
lore
Share & tools
lore

Axel Lin

author
#0 lore raw

PATCH 1/1 ASoC: soc-jack: Fix checking return value of request_any_context_irq

request_any_context_irq() returns a negative value on failure. On success, it returns either IRQC_IS_HARDIRQ or IRQC_IS_NESTED.

---
 sound/soc/soc-jack.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
sound/soc/soc-jack.c +1 -1
index 7c17b98..38b0013 100644
@@ -327,7 +327,7 @@ int snd_soc_jack_add_gpios(struct snd_soc_jack *jack, int count,
 					      IRQF_TRIGGER_FALLING,
 					      gpios[i].name,
 					      &gpios[i]);
-		if (ret)
+		if (ret < 0)
 			goto err;
 
 		if (gpios[i].wake) {
Signature · 1 line
1.7.4.1
Applied
#1 lore raw
Quoted 2 lines · Axel Lin

request_any_context_irq() returns a negative value on failure. On success, it returns either IRQC_IS_HARDIRQ or IRQC_IS_NESTED.

Applied, thanks.