summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorArvind Yadav <arvind.yadav.cs@gmail.com>2017-11-29 17:17:12 +0100
committerMark Brown <broonie@kernel.org>2017-12-01 14:06:14 +0100
commitfa8cc38165c2f6f73bf947087b3cdc5dd9b9b560 (patch)
tree6957b38cfeb6df01d55acde74429706678f9905f
parentLinux 4.15-rc1 (diff)
downloadlinux-fa8cc38165c2f6f73bf947087b3cdc5dd9b9b560.tar.xz
linux-fa8cc38165c2f6f73bf947087b3cdc5dd9b9b560.zip
ASoC: nuc900: Fix platform_get_irq's error checking
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>
-rw-r--r--sound/soc/nuc900/nuc900-ac97.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sound/soc/nuc900/nuc900-ac97.c b/sound/soc/nuc900/nuc900-ac97.c
index b6615affe571..5e4fbd2d3479 100644
--- a/sound/soc/nuc900/nuc900-ac97.c
+++ b/sound/soc/nuc900/nuc900-ac97.c
@@ -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;
}