Skip to content

Commit

Permalink
ASoC: nuc900: Fix platform_get_irq's error checking
Browse files Browse the repository at this point in the history
The platform_get_irq() function returns negative if an error occurs.
zero or positive number on success. platform_get_irq() error checking
for zero is not correct.

Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
  • Loading branch information
Arvind Yadav authored and Mark Brown committed Dec 1, 2017
1 parent 4fbd8d1 commit fa8cc38
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions sound/soc/nuc900/nuc900-ac97.c
Original file line number Diff line number Diff line change
Expand Up @@ -346,8 +346,8 @@ static int nuc900_ac97_drvprobe(struct platform_device *pdev)
}

nuc900_audio->irq_num = platform_get_irq(pdev, 0);
if (!nuc900_audio->irq_num) {
ret = -EBUSY;
if (nuc900_audio->irq_num <= 0) {
ret = nuc900_audio->irq_num < 0 ? nuc900_audio->irq_num : -EBUSY;
goto out;
}

Expand Down

0 comments on commit fa8cc38

Please sign in to comment.