From: Fabio Estevam Date: Wed, 7 Jan 2015 21:45:40 +0000 (-0200) Subject: ASoC: fsl_ssi: Fix irq error check X-Git-Tag: v3.19-rc7~18^2~1^2~1^4 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=64aa5f5843ab12455f6984928058a267f385a82c;p=karo-tx-linux.git ASoC: fsl_ssi: Fix irq error check Commit 2ffa531078037a0 ("ASoC: fsl_ssi: Fix module unbound") changed the way to retrieve the irq number from irq_of_parse_and_map() to platform_get_irq(), but missed to updated the irq error check accordingly. We should test for negative irq number and propagate it in the case of error. Signed-off-by: Fabio Estevam Signed-off-by: Mark Brown --- diff --git a/sound/soc/fsl/fsl_ssi.c b/sound/soc/fsl/fsl_ssi.c index a65f17d57ffb..059496ed9ad7 100644 --- a/sound/soc/fsl/fsl_ssi.c +++ b/sound/soc/fsl/fsl_ssi.c @@ -1362,9 +1362,9 @@ 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", np->full_name); - return -ENXIO; + return ssi_private->irq; } /* Are the RX and the TX clocks locked? */