diff mbox series

[4/4] ASoC: amd: pcm-dma: Fix signedness bug in acp3x_audio_probe()

Message ID 20220304131534.GD28739@kili
State Accepted
Commit 9a33f5632ca573e512c49fa46cc7131cbc83d4c9
Headers show
Series [1/3] ASoC: amd: acp: Fix signedness bug in renoir_audio_probe() | expand

Commit Message

Dan Carpenter March 4, 2022, 1:15 p.m. UTC
The "adata->i2s_irq" variable is unsigned so this error handling
code will not work.

Fixes: 87d71a128771 ("ASoC: amd: pcm-dma: Use platform_get_irq() to get the interrupt")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
---
 sound/soc/amd/raven/acp3x-pcm-dma.c | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)
diff mbox series

Patch

diff --git a/sound/soc/amd/raven/acp3x-pcm-dma.c b/sound/soc/amd/raven/acp3x-pcm-dma.c
index e4f8dbf0d11d..6aec11cf0a6a 100644
--- a/sound/soc/amd/raven/acp3x-pcm-dma.c
+++ b/sound/soc/amd/raven/acp3x-pcm-dma.c
@@ -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,