ASoC: cs35l36: Fix an IS_ERR() vs NULL checking bug
Subsystems (4)
PATCH 1/1 ASoC: cs35l36: Fix an IS_ERR() vs NULL checking bug
The irq_get_irq_data() function doesn't return error pointers, it returns NULL.
--- sound/soc/codecs/cs35l36.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
sound/soc/codecs/cs35l36.c +2 -2
@@ -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; }
Signature · 1 line
2.17.1
Quoted 6 lines · Dan Carpenter
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 <[email protected]>---
Thanks,
Charles
Schulman, James
Reviewed-byQuoted 4 lines · Charles Keepax
Quoted 3 lines · Dan Carpenter
The
irq_get_irq_data()function doesn't return error pointers, it returns NULL.
Quoted 9 lines
Quoted 3 lines
Fixes 6ba9dd6c893b ("ASoC: cs35l36: Add support for Cirrus CS35L36 Amplifier")Signed-off-by Dan Carpenter <[email protected]>---
Reviewed-by Charles Keepax <[email protected]>Thanks,
Charles
Thanks Dan.
- James
Mark Brown
maintainerApplied "ASoC: cs35l36: Fix an IS_ERR() vs NULL checking bug" to the asoc tree
In reply to Dan CarpenterThe 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 <[email protected]>
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.
--- sound/soc/codecs/cs35l36.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
sound/soc/codecs/cs35l36.c +2 -2
@@ -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; }
Signature · 1 line
2.20.1