Skip to content

Commit

Permalink
ASoC: fsl_ssi: let check zero instead of check NO_IRQ
Browse files Browse the repository at this point in the history
NO_IRQ may be defined as '(unsigned int) -1' in some architectures
(arm, sh ...), and either may not be defined in some architectures
which can enable SND_SOC_FSL_SSI (e.g. allmodconfig for arc).

When irq_of_parse_and_map() fails, it will always return 0, so need
check zero instead of NO_IRQ, or will cause compiling issue or run
time bug in some architectures.

Signed-off-by: Chen Gang <gang.chen@asianux.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
  • Loading branch information
Chen Gang authored and Mark Brown committed Sep 26, 2013
1 parent 64d2307 commit d60336e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion sound/soc/fsl/fsl_ssi.c
Original file line number Diff line number Diff line change
Expand Up @@ -929,7 +929,7 @@ static int fsl_ssi_probe(struct platform_device *pdev)
ssi_private->ssi_phys = res.start;

ssi_private->irq = irq_of_parse_and_map(np, 0);
if (ssi_private->irq == NO_IRQ) {
if (!ssi_private->irq) {
dev_err(&pdev->dev, "no irq for node %s\n", np->full_name);
return -ENXIO;
}
Expand Down

0 comments on commit d60336e

Please sign in to comment.