mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-18 01:34:14 +08:00
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:
parent
4fbd8d194f
commit
fa8cc38165
@ -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;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user