summaryrefslogtreecommitdiffstats
path: root/sound/soc/nuc900
diff options
context:
space:
mode:
authorDan Carpenter <dan.carpenter@oracle.com>2017-12-09 14:52:03 +0300
committerMark Brown <broonie@kernel.org>2017-12-11 11:42:03 +0000
commitcd430a244cd5d3ca0f4053718eabdf42bc12c517 (patch)
treed640bcd08422e6c4563bd3ef399da19ec964b925 /sound/soc/nuc900
parentfa8cc38165c2f6f73bf947087b3cdc5dd9b9b560 (diff)
downloadlinux-stable-cd430a244cd5d3ca0f4053718eabdf42bc12c517.tar.gz
linux-stable-cd430a244cd5d3ca0f4053718eabdf42bc12c517.tar.bz2
linux-stable-cd430a244cd5d3ca0f4053718eabdf42bc12c517.zip
ASoC: nuc900: Fix platform_get_irq() error checking some more
The error handling doesn't work here because "nuc900_audio->irq_num" is unsigned. Also we should be checking for < 0 and not <= 0 but I believe that's harmless. The platform_get_irq() comments don't talk about the return values... Fixes: fa8cc38165c2 ("ASoC: nuc900: Fix platform_get_irq's error checking") Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound/soc/nuc900')
-rw-r--r--sound/soc/nuc900/nuc900-ac97.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/sound/soc/nuc900/nuc900-ac97.c b/sound/soc/nuc900/nuc900-ac97.c
index 5e4fbd2d3479..71fce7c85c93 100644
--- a/sound/soc/nuc900/nuc900-ac97.c
+++ b/sound/soc/nuc900/nuc900-ac97.c
@@ -345,11 +345,10 @@ static int nuc900_ac97_drvprobe(struct platform_device *pdev)
goto out;
}
- nuc900_audio->irq_num = platform_get_irq(pdev, 0);
- if (nuc900_audio->irq_num <= 0) {
- ret = nuc900_audio->irq_num < 0 ? nuc900_audio->irq_num : -EBUSY;
+ ret = platform_get_irq(pdev, 0);
+ if (ret < 0)
goto out;
- }
+ nuc900_audio->irq_num = ret;
nuc900_ac97_data = nuc900_audio;