Commit 00925272 authored by Dan Carpenter's avatar Dan Carpenter Committed by Mark Brown

ASoC: amd: pcm-dma: Fix signedness bug in acp_pdm_audio_probe()

The "adata->pdm_irq" variable is unsigned so the error handling will
not work.

Fixes: 87d71a12 ("ASoC: amd: pcm-dma: Use platform_get_irq() to get the interrupt")
Signed-off-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
Link: https://lore.kernel.org/r/20220304131335.GB28739@kiliSigned-off-by: default avatarMark Brown <broonie@kernel.org>
parent 899a9a7f
......@@ -399,9 +399,10 @@ static int acp_pdm_audio_probe(struct platform_device *pdev)
if (!adata->acp_base)
return -ENOMEM;
adata->pdm_irq = platform_get_irq(pdev, 0);
if (adata->pdm_irq < 0)
return -ENODEV;
status = platform_get_irq(pdev, 0);
if (status < 0)
return status;
adata->pdm_irq = status;
adata->capture_stream = NULL;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment