Skip to content

Commit

Permalink
ASoC: nuc900: Fix platform_get_irq() error checking some more
Browse files Browse the repository at this point in the history
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: fa8cc38 ("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>
  • Loading branch information
Dan Carpenter authored and Mark Brown committed Dec 11, 2017
1 parent fa8cc38 commit cd430a2
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions sound/soc/nuc900/nuc900-ac97.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down

0 comments on commit cd430a2

Please sign in to comment.