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: Jiapeng Chong <jiapeng.chong@linux.alibaba.com>,
	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>,
	Ye Bin <yebin10@huawei.com>
Subject: [PATCH 2/4] ASoC: amd: pcm-dma: Fix signedness bug in acp_pdm_audio_probe()
Date: Fri, 4 Mar 2022 16:13:35 +0300	[thread overview]
Message-ID: <20220304131335.GB28739@kili> (raw)
In-Reply-To: <20220304131256.GA28739@kili>

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


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

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-03-04 13:12 [PATCH 1/4] ASoC: amd: vg: fix signedness bug in acp5x_audio_probe() Dan Carpenter
2022-03-04 13:13 ` Dan Carpenter [this message]
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=20220304131335.GB28739@kili \
    --to=dan.carpenter@oracle.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=broonie@kernel.org \
    --cc=jiapeng.chong@linux.alibaba.com \
    --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 \
    --cc=yebin10@huawei.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