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: fa8cc38165 ("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>
This commit is contained in:
Dan Carpenter 2017-12-09 14:52:03 +03:00 committed by Mark Brown
parent fa8cc38165
commit cd430a244c
No known key found for this signature in database
GPG Key ID: 24D68B725D5487D0
1 changed files with 3 additions and 4 deletions

View File

@ -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;