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

This change “ASoC: soc-jack: Fix checking return value of request_any_context_irq” (commit d2b4c7b) in Linux kernel is authored by Axel Lin <axel.lin [at] gmail.com> on Sat Aug 13 19:15:01 2011 +0800.

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

The change “ASoC: soc-jack: Fix checking return value of request_any_context_irq” introduces changes as follows.

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

Linux kernel releases containing commit d2b4c7b

The Linux kernel releases containing this commit are as follows.

Linux kernel code changes from "ASoC: soc-jack: Fix checking return value of request_any_context_irq"

There are 2 lines of Linux source code added/deleted in this change. Code changes to Linux kernel are as follows.

 sound/soc/soc-jack.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
 
diff --git a/sound/soc/soc-jack.c b/sound/soc/soc-jack.c
index 7c17b98d5846..38b00131b2fe 100644
--- a/sound/soc/soc-jack.c
+++ b/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) {

The commit for this change in Linux stable tree is d2b4c7b (patch).

Last modified: 2020/02/10