diff mbox series

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

Message ID 20220304131256.GA28739@kili
State Accepted
Commit 468f252930d8fda0e4365b788b4b621fe59c05ce
Headers show
Series [1/4] ASoC: amd: vg: fix signedness bug in acp5x_audio_probe() | expand

Commit Message

Dan Carpenter March 4, 2022, 1:12 p.m. UTC
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(-)

Comments

Mark Brown March 7, 2022, 12:40 p.m. UTC | #1
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.
Dan Carpenter March 7, 2022, 12:41 p.m. UTC | #2
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
Mark Brown March 7, 2022, 4:27 p.m. UTC | #3
On Mon, Mar 07, 2022 at 03:41:52PM +0300, Dan Carpenter wrote:

> 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.
diff mbox series

Patch

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,