[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") Signed-off-by: Dan Carpenter dan.carpenter@oracle.com --- sound/soc/amd/vangogh/acp5x-pcm-dma.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/sound/soc/amd/vangogh/acp5x-pcm-dma.c b/sound/soc/amd/vangogh/acp5x-pcm-dma.c index e4e668593b3d..31fa166df98a 100644 --- a/sound/soc/amd/vangogh/acp5x-pcm-dma.c +++ b/sound/soc/amd/vangogh/acp5x-pcm-dma.c @@ -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,
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 dan.carpenter@oracle.com --- sound/soc/amd/renoir/acp3x-pdm-dma.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/sound/soc/amd/renoir/acp3x-pdm-dma.c b/sound/soc/amd/renoir/acp3x-pdm-dma.c index 88a242538461..8c42345ee41e 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;
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") Signed-off-by: Dan Carpenter dan.carpenter@oracle.com --- sound/soc/amd/acp/acp-renoir.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/sound/soc/amd/acp/acp-renoir.c b/sound/soc/amd/acp/acp-renoir.c index 738cf2e2b973..75c9229ece97 100644 --- a/sound/soc/amd/acp/acp-renoir.c +++ b/sound/soc/amd/acp/acp-renoir.c @@ -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;
On Fri, 4 Mar 2022 16:14:49 +0300, Dan Carpenter wrote:
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
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 --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,
On Mon, Mar 07, 2022 at 12:40:10PM +0000, Mark Brown wrote:
On Fri, Mar 04, 2022 at 04:12:56PM +0300, Dan Carpenter wrote:
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
participants (2)
-
Dan Carpenter
-
Mark Brown