kernel-janitors.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/2] ASoC: nuc900: Fix platform_get_irq() error checking some more
@ 2017-12-09 11:52 Dan Carpenter
  2017-12-09 11:52 ` [PATCH 2/2 resend] ASoC: nuc900: Fix a loop timeout test Dan Carpenter
                   ` (2 more replies)
  0 siblings, 3 replies; 15+ messages in thread
From: Dan Carpenter @ 2017-12-09 11:52 UTC (permalink / raw)
  To: Liam Girdwood, Arvind Yadav
  Cc: alsa-devel, Mark Brown, kernel-janitors, Takashi Iwai

The error handling doesn't work here because "nuc900_audio->irq_num" is
unsigned.  Also we should be checking for < 0 and not <= 0 but I believe
that's harmless.  The platform_get_irq() comments don't talk about the
return values...

Fixes: fa8cc38165c2 ("ASoC: nuc900: Fix platform_get_irq's error checking")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>

diff --git a/sound/soc/nuc900/nuc900-ac97.c b/sound/soc/nuc900/nuc900-ac97.c
index 5e4fbd2d3479..71fce7c85c93 100644
--- a/sound/soc/nuc900/nuc900-ac97.c
+++ b/sound/soc/nuc900/nuc900-ac97.c
@@ -345,11 +345,10 @@ static int nuc900_ac97_drvprobe(struct platform_device *pdev)
 		goto out;
 	}
 
-	nuc900_audio->irq_num = platform_get_irq(pdev, 0);
-	if (nuc900_audio->irq_num <= 0) {
-		ret = nuc900_audio->irq_num < 0 ? nuc900_audio->irq_num : -EBUSY;
+	ret = platform_get_irq(pdev, 0);
+	if (ret < 0)
 		goto out;
-	}
+	nuc900_audio->irq_num = ret;
 
 	nuc900_ac97_data = nuc900_audio;
 

^ permalink raw reply related	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2017-12-11 16:41 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-12-09 11:52 [PATCH 1/2] ASoC: nuc900: Fix platform_get_irq() error checking some more Dan Carpenter
2017-12-09 11:52 ` [PATCH 2/2 resend] ASoC: nuc900: Fix a loop timeout test Dan Carpenter
2017-12-09 13:45 ` [PATCH 1/2] ASoC: nuc900: Fix platform_get_irq() error checking some more arvindY
2017-12-09 17:27   ` [alsa-devel] " Alexandre Belloni
2017-12-09 18:49     ` arvindY
2017-12-10  1:52     ` Dan Carpenter
2017-12-10  2:52       ` arvindY
2017-12-11  8:40         ` Dan Carpenter
2017-12-11  9:19           ` Arvind Yadav
2017-12-11 10:27             ` Dan Carpenter
2017-12-11 11:49               ` Alexandre Belloni
2017-12-11 12:01                 ` Dan Carpenter
2017-12-11 16:41                   ` Alexandre Belloni
2017-12-11 12:02                 ` Mark Brown
2017-12-11 12:14 ` Applied "ASoC: nuc900: Fix platform_get_irq() error checking some more" to the asoc tree Mark Brown

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).