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>
This commit is contained in:
Arvind Yadav 2017-11-29 21:47:12 +05:30 committed by Mark Brown
parent 4fbd8d194f
commit fa8cc38165
No known key found for this signature in database
GPG Key ID: 24D68B725D5487D0

View File

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