From: Dan Carpenter Date: Fri, 4 Mar 2022 13:13:35 +0000 (+0300) Subject: ASoC: amd: pcm-dma: Fix signedness bug in acp_pdm_audio_probe() X-Git-Tag: v5.18-rc1~152^2~7^2~70 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=00925272f166db31fed73f3c00c151eb5f7ce1d8;p=thirdparty%2Fkernel%2Flinux.git 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: 87d71a128771 ("ASoC: amd: pcm-dma: Use platform_get_irq() to get the interrupt") Signed-off-by: Dan Carpenter Link: https://lore.kernel.org/r/20220304131335.GB28739@kili Signed-off-by: Mark Brown --- diff --git a/sound/soc/amd/renoir/acp3x-pdm-dma.c b/sound/soc/amd/renoir/acp3x-pdm-dma.c index 88a2425384619..8c42345ee41e9 100644 --- a/sound/soc/amd/renoir/acp3x-pdm-dma.c +++ b/sound/soc/amd/renoir/acp3x-pdm-dma.c @@ -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;