]> git.baikalelectronics.ru Git - kernel.git/commitdiff
ASoC: amd: pcm-dma: Fix signedness bug in acp3x_audio_probe()
authorDan Carpenter <dan.carpenter@oracle.com>
Fri, 4 Mar 2022 13:15:34 +0000 (16:15 +0300)
committerMark Brown <broonie@kernel.org>
Mon, 7 Mar 2022 13:14:49 +0000 (13:14 +0000)
The "adata->i2s_irq" variable is unsigned so this error handling
code will not work.

Fixes: 667c949982cc ("ASoC: amd: pcm-dma: Use platform_get_irq() to get the interrupt")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Link: https://lore.kernel.org/r/20220304131534.GD28739@kili
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/amd/raven/acp3x-pcm-dma.c

index e4f8dbf0d11dcff4fed7cc3b7dc768aeb4422e95..6aec11cf0a6ae66c06fa4bc87c5e4fd5063119ad 100644 (file)
@@ -394,9 +394,10 @@ static int acp3x_audio_probe(struct platform_device *pdev)
        if (!adata->acp3x_base)
                return -ENOMEM;
 
-       adata->i2s_irq =  platform_get_irq(pdev, 0);
-       if (adata->i2s_irq < 0)
-               return -ENODEV;
+       status = platform_get_irq(pdev, 0);
+       if (status < 0)
+               return status;
+       adata->i2s_irq = status;
 
        dev_set_drvdata(&pdev->dev, adata);
        status = devm_snd_soc_register_component(&pdev->dev,