Browse Source

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.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Cc: stable@kernel.orG
Axel Lin 14 years ago
parent
commit
d2b4c7bd7e
1 changed files with 1 additions and 1 deletions
  1. 1 1
      sound/soc/soc-jack.c

+ 1 - 1
sound/soc/soc-jack.c

@@ -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) {