1
0
Fork 0

ASoC: fsl_ssi: Fix platform_get_irq() error handling

We should check whether platform_get_irq() returns a negative number and
propagate the error in this case.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
hifive-unleashed-5.1
Fabio Estevam 2015-04-15 00:08:15 -03:00 committed by Mark Brown
parent 7667428f80
commit 28ecc0b658
1 changed files with 1 additions and 1 deletions

View File

@ -1357,7 +1357,7 @@ static int fsl_ssi_probe(struct platform_device *pdev)
}
ssi_private->irq = platform_get_irq(pdev, 0);
if (!ssi_private->irq) {
if (ssi_private->irq < 0) {
dev_err(&pdev->dev, "no irq for node %s\n", pdev->name);
return ssi_private->irq;
}