Skip to contentSkip to conversation

ASoC: amd: vg: fix signedness bug in acp5x_audio_probe()

PATCH In review Dan Carpenter 2 participants 8 messages Mar 4, 2022 – Mar 7, 2022

Subsystems (4)
lore
Share & tools
lore
#0 lore raw

PATCH 1/4 ASoC: amd: vg: fix signedness bug in acp5x_audio_probe()

The "adata->i2s_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")
---
 sound/soc/amd/vangogh/acp5x-pcm-dma.c | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)
sound/soc/amd/vangogh/acp5x-pcm-dma.c +4 -3
index e4e668593b3d..31fa166df98a 100644
@@ -388,9 +388,10 @@ static int acp5x_audio_probe(struct platform_device *pdev)
 	if (!adata->acp5x_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,
Signature · 1 line
2.20.1
#1 lore raw

PATCH 2/4 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")
---
 sound/soc/amd/renoir/acp3x-pdm-dma.c | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)
sound/soc/amd/renoir/acp3x-pdm-dma.c +4 -3
index 88a242538461..8c42345ee41e 100644
@@ -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;
 
Signature · 1 line
2.20.1
#2 lore raw

PATCH 1/3 ASoC: amd: acp: Fix signedness bug in renoir_audio_probe()

In reply to Dan Carpenter

The "adata->i2s_irq" is unsigned so this error handling will not work.

Fixes 3304a242f45a ("ASoC: amd: Use platform_get_irq_byname() to get the interrupt")
---
 sound/soc/amd/acp/acp-renoir.c | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)
sound/soc/amd/acp/acp-renoir.c +4 -3
index 738cf2e2b973..75c9229ece97 100644
@@ -282,9 +282,10 @@ static int renoir_audio_probe(struct platform_device *pdev)
 	if (!adata->acp_base)
 		return -ENOMEM;
 
-	adata->i2s_irq = platform_get_irq_byname(pdev, "acp_dai_irq");
-	if (adata->i2s_irq < 0)
-		return -ENODEV;
+	ret = platform_get_irq_byname(pdev, "acp_dai_irq");
+	if (ret < 0)
+		return ret;
+	adata->i2s_irq = ret;
 
 	adata->dev = dev;
 	adata->dai_driver = acp_renoir_dai;
Signature · 1 line
2.20.1
#4 lore raw

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

In reply to Dan Carpenter

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")
---
 sound/soc/amd/raven/acp3x-pcm-dma.c | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)
sound/soc/amd/raven/acp3x-pcm-dma.c +4 -3
index e4f8dbf0d11d..6aec11cf0a6a 100644
@@ -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,
Signature · 1 line
2.20.1
maintainer
#5 lore raw
In reply to Dan Carpenter
Quoted 2 lines · Dan Carpenter

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

This series has a 1/4 and a 1/3 but no 3/4.

#6 lore raw
Quoted 5 lines · Mark Brown
Quoted 2 lines · Dan Carpenter

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

This series has a 1/4 and a 1/3 but no 3/4.

Oops. Sorry about that. The 1/3 was intended to be 3/4. Do you need me to resend it?

regards,
dan carpenter

maintainer
#7 lore raw
Quoted 2 lines · Dan Carpenter

Oops. Sorry about that. The 1/3 was intended to be 3/4. Do you need me to resend it?

I think I worked around it but please check what gets applied and resend anything that got dropped.

maintainer
#3 lore raw

Re: [PATCH 1/3] ASoC: amd: acp: Fix signedness bug in renoir_audio_probe()

In reply to Dan Carpenter
Quoted 4 lines · Dan Carpenter

The "adata->i2s_irq" is unsigned so this error handling will not work.

Applied to

https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-next

Thanks!

[1/3] ASoC: amd: acp: Fix signedness bug in renoir_audio_probe()

      commit: 899a9a7f624b5a9d100c9ac6b3f0960981f0e4c5
[2/4] ASoC: amd: pcm-dma: Fix signedness bug in acp_pdm_audio_probe()
      commit: 00925272f166db31fed73f3c00c151eb5f7ce1d8
[4/4] ASoC: amd: pcm-dma: Fix signedness bug in acp3x_audio_probe()
      commit: 9a33f5632ca573e512c49fa46cc7131cbc83d4c9

All being well this means that it will be integrated into the linux-next tree (usually sometime in the next 24 hours) and sent to Linus during the next merge window (or sooner if it is a bug fix), however if problems are discovered then the patch may be dropped or reverted.

You may get further e-mails resulting from automated or manual testing and review of the tree, please engage with people reporting problems and send followup patches addressing any issues that are reported if needed.

If any updates are required or you are submitting further changes they should be sent as incremental updates against current git, existing patches will not be replaced.

Please add any relevant lists and maintainers to the CCs when replying to this mail.

Thanks,
Mark