kernel-janitors.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] ASoC: cs35l36: Fix an IS_ERR() vs NULL checking bug
@ 2019-02-22  6:31 Dan Carpenter
  2019-02-22  9:22 ` [alsa-devel] " Charles Keepax
  2019-02-26 12:06 ` Applied "ASoC: cs35l36: Fix an IS_ERR() vs NULL checking bug" to the asoc tree Mark Brown
  0 siblings, 2 replies; 4+ messages in thread
From: Dan Carpenter @ 2019-02-22  6:31 UTC (permalink / raw)
  To: Brian Austin, James Schulman
  Cc: alsa-devel, kernel-janitors, Takashi Iwai, Paul Handrigan,
	Liam Girdwood, Mark Brown

The irq_get_irq_data() function doesn't return error pointers, it
returns NULL.

Fixes: 6ba9dd6c893b ("ASoC: cs35l36: Add support for Cirrus CS35L36 Amplifier")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
---
 sound/soc/codecs/cs35l36.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/sound/soc/codecs/cs35l36.c b/sound/soc/codecs/cs35l36.c
index e374fffb7e17..901d57491218 100644
--- a/sound/soc/codecs/cs35l36.c
+++ b/sound/soc/codecs/cs35l36.c
@@ -1845,9 +1845,9 @@ static int cs35l36_i2c_probe(struct i2c_client *i2c_client,
 		cs35l36_apply_vpbr_config(cs35l36);
 
 	irq_d = irq_get_irq_data(i2c_client->irq);
-	if (IS_ERR(irq_d)) {
+	if (!irq_d) {
 		dev_err(&i2c_client->dev, "Invalid IRQ: %d\n", i2c_client->irq);
-		ret = PTR_ERR(irq_d);
+		ret = -ENODEV;
 		goto err;
 	}
 
-- 
2.17.1

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

* Re: [alsa-devel] [PATCH] ASoC: cs35l36: Fix an IS_ERR() vs NULL checking bug
  2019-02-22  6:31 [PATCH] ASoC: cs35l36: Fix an IS_ERR() vs NULL checking bug Dan Carpenter
@ 2019-02-22  9:22 ` Charles Keepax
  2019-02-22 21:50   ` Schulman, James
  2019-02-26 12:06 ` Applied "ASoC: cs35l36: Fix an IS_ERR() vs NULL checking bug" to the asoc tree Mark Brown
  1 sibling, 1 reply; 4+ messages in thread
From: Charles Keepax @ 2019-02-22  9:22 UTC (permalink / raw)
  To: Dan Carpenter
  Cc: Brian Austin, alsa-devel, Liam Girdwood, kernel-janitors,
	Takashi Iwai, Paul Handrigan, James Schulman, Mark Brown

On Fri, Feb 22, 2019 at 09:31:51AM +0300, Dan Carpenter wrote:
> The irq_get_irq_data() function doesn't return error pointers, it
> returns NULL.
> 
> Fixes: 6ba9dd6c893b ("ASoC: cs35l36: Add support for Cirrus CS35L36 Amplifier")
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
> ---

Reviewed-by: Charles Keepax <ckeepax@opensource.cirrus.com>

Thanks,
Charles

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

* Re: [alsa-devel] [PATCH] ASoC: cs35l36: Fix an IS_ERR() vs NULL checking bug
  2019-02-22  9:22 ` [alsa-devel] " Charles Keepax
@ 2019-02-22 21:50   ` Schulman, James
  0 siblings, 0 replies; 4+ messages in thread
From: Schulman, James @ 2019-02-22 21:50 UTC (permalink / raw)
  To: Charles Keepax
  Cc: Austin, Brian, alsa-devel@alsa-project.org, Liam Girdwood,
	kernel-janitors@vger.kernel.org, Takashi Iwai, Handrigan, Paul,
	Schulman, James, Mark Brown, Dan Carpenter



On Fri, 22 Feb 2019, Charles Keepax wrote:

> On Fri, Feb 22, 2019 at 09:31:51AM +0300, Dan Carpenter wrote:
>> The irq_get_irq_data() function doesn't return error pointers, it
>> returns NULL.
>>
>> Fixes: 6ba9dd6c893b ("ASoC: cs35l36: Add support for Cirrus CS35L36 Amplifier")
>> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
>> ---
>
> Reviewed-by: Charles Keepax <ckeepax@opensource.cirrus.com>
>
> Thanks,
> Charles
>

Thanks Dan.

Reviewed-by: James Schulman <james.schulman@cirrus.com>

- James

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

* Applied "ASoC: cs35l36: Fix an IS_ERR() vs NULL checking bug" to the asoc tree
  2019-02-22  6:31 [PATCH] ASoC: cs35l36: Fix an IS_ERR() vs NULL checking bug Dan Carpenter
  2019-02-22  9:22 ` [alsa-devel] " Charles Keepax
@ 2019-02-26 12:06 ` Mark Brown
  1 sibling, 0 replies; 4+ messages in thread
From: Mark Brown @ 2019-02-26 12:06 UTC (permalink / raw)
  To: Dan Carpenter
  Cc: Brian Austin, alsa-devel, Liam Girdwood, kernel-janitors,
	Takashi Iwai, Paul Handrigan, James Schulman, Mark Brown

The patch

   ASoC: cs35l36: Fix an IS_ERR() vs NULL checking bug

has been applied to the asoc tree at

   https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git 

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

From eb23dcd20e91fe97679257dc4d195a707b4a0d1a Mon Sep 17 00:00:00 2001
From: Dan Carpenter <dan.carpenter@oracle.com>
Date: Fri, 22 Feb 2019 09:31:51 +0300
Subject: [PATCH] ASoC: cs35l36: Fix an IS_ERR() vs NULL checking bug

The irq_get_irq_data() function doesn't return error pointers, it
returns NULL.

Fixes: 6ba9dd6c893b ("ASoC: cs35l36: Add support for Cirrus CS35L36 Amplifier")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Reviewed-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
---
 sound/soc/codecs/cs35l36.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/sound/soc/codecs/cs35l36.c b/sound/soc/codecs/cs35l36.c
index dc8cf61b9db8..e9b5f76f27a8 100644
--- a/sound/soc/codecs/cs35l36.c
+++ b/sound/soc/codecs/cs35l36.c
@@ -1845,9 +1845,9 @@ static int cs35l36_i2c_probe(struct i2c_client *i2c_client,
 		cs35l36_apply_vpbr_config(cs35l36);
 
 	irq_d = irq_get_irq_data(i2c_client->irq);
-	if (IS_ERR(irq_d)) {
+	if (!irq_d) {
 		dev_err(&i2c_client->dev, "Invalid IRQ: %d\n", i2c_client->irq);
-		ret = PTR_ERR(irq_d);
+		ret = -ENODEV;
 		goto err;
 	}
 
-- 
2.20.1

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

end of thread, other threads:[~2019-02-26 12:06 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-02-22  6:31 [PATCH] ASoC: cs35l36: Fix an IS_ERR() vs NULL checking bug Dan Carpenter
2019-02-22  9:22 ` [alsa-devel] " Charles Keepax
2019-02-22 21:50   ` Schulman, James
2019-02-26 12:06 ` Applied "ASoC: cs35l36: Fix an IS_ERR() vs NULL checking bug" 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).