Alsa-Devel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Dan Carpenter <dan.carpenter@oracle.com>
To: Liam Girdwood <lgirdwood@gmail.com>, Meng Tang <tangmeng@uniontech.com>
Cc: alsa-devel@alsa-project.org, kernel-janitors@vger.kernel.org,
	Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>,
	Takashi Iwai <tiwai@suse.com>, Mark Brown <broonie@kernel.org>,
	Vijendar Mukunda <Vijendar.Mukunda@amd.com>
Subject: [PATCH 1/4] ASoC: amd: vg: fix signedness bug in acp5x_audio_probe()
Date: Fri, 4 Mar 2022 16:12:56 +0300	[thread overview]
Message-ID: <20220304131256.GA28739@kili> (raw)

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,
-- 
2.20.1


             reply	other threads:[~2022-03-04 13:14 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-03-04 13:12 Dan Carpenter [this message]
2022-03-04 13:13 ` [PATCH 2/4] ASoC: amd: pcm-dma: Fix signedness bug in acp_pdm_audio_probe() Dan Carpenter
2022-03-04 13:14 ` [PATCH 1/3] ASoC: amd: acp: Fix signedness bug in renoir_audio_probe() Dan Carpenter
2022-03-07 20:39   ` Mark Brown
2022-03-04 13:15 ` [PATCH 4/4] ASoC: amd: pcm-dma: Fix signedness bug in acp3x_audio_probe() Dan Carpenter
2022-03-07 12:40 ` [PATCH 1/4] ASoC: amd: vg: fix signedness bug in acp5x_audio_probe() Mark Brown
2022-03-07 12:41   ` Dan Carpenter
2022-03-07 16:27     ` Mark Brown

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220304131256.GA28739@kili \
    --to=dan.carpenter@oracle.com \
    --cc=Vijendar.Mukunda@amd.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=broonie@kernel.org \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=lgirdwood@gmail.com \
    --cc=pierre-louis.bossart@linux.intel.com \
    --cc=tangmeng@uniontech.com \
    --cc=tiwai@suse.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox