From: Fabio Estevam Date: Wed, 15 Apr 2015 03:08:15 +0000 (-0300) Subject: ASoC: fsl_ssi: Fix platform_get_irq() error handling X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=28ecc0b658e2ac882faa80e7ff1d72d144299bd0;p=GitHub%2FLineageOS%2FG12%2Fandroid_kernel_amlogic_linux-4.9.git 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 Signed-off-by: Mark Brown --- diff --git a/sound/soc/fsl/fsl_ssi.c b/sound/soc/fsl/fsl_ssi.c index e8bb8eef1d16..0d48804218b1 100644 --- a/sound/soc/fsl/fsl_ssi.c +++ b/sound/soc/fsl/fsl_ssi.c @@ -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; }