Skip to content

Commit

Permalink
ASoC: soc-jack: Fix checking return value of request_any_context_irq
Browse files Browse the repository at this point in the history
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
  • Loading branch information
Axel Lin authored and Mark Brown committed Aug 15, 2011
1 parent b848792 commit d2b4c7b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion sound/soc/soc-jack.c
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit d2b4c7b

Please sign in to comment.