Commit 9a33f563 authored by Dan Carpenter's avatar Dan Carpenter Committed by Mark Brown

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

The "adata->i2s_irq" variable is unsigned so this error handling
code 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/20220304131534.GD28739@kiliSigned-off-by: default avatarMark Brown <broonie@kernel.org>
parent 00925272
......@@ -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,
......
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