ASoC: fsl_ssi: Fix irq error check
authorFabio Estevam <fabio.estevam@freescale.com>
Wed, 7 Jan 2015 21:45:40 +0000 (19:45 -0200)
committerMark Brown <broonie@kernel.org>
Thu, 8 Jan 2015 18:17:33 +0000 (18:17 +0000)
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 <fabio.estevam@freescale.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/fsl/fsl_ssi.c

index a65f17d57ffb44733b7858364678581308dea040..059496ed9ad76c4771ccafbe593a1e0c971f9420 100644 (file)
@@ -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? */
This page took 0.026736 seconds and 5 git commands to generate.