ASoC: cs35l33: Fix testing return value of devm_gpiod_get_optional
Subsystems (3)
PATCH 1/2 ASoC: cs35l33: Fix testing return value of devm_gpiod_get_optional
devm_gpiod_get_optional() returns NULL when the gpio is not assigned. So the if (PTR_ERR(cs35l33->reset_gpio) == -ENOENT) test is always false.
--- sound/soc/codecs/cs35l33.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-)
sound/soc/codecs/cs35l33.c +1 -5
@@ -1176,11 +1176,7 @@ static int cs35l33_i2c_probe(struct i2c_client *i2c_client,/* We could issue !RST or skip it based on AMP topology */ cs35l33->reset_gpio =devm_gpiod_get_optional (&i2c_client->dev,"reset-gpios" ,GPIOD_OUT_HIGH ); - -if (PTR_ERR (cs35l33->reset_gpio) == -ENOENT ) { -dev_warn (&i2c_client->dev, -"%s WARNING: No reset gpio assigned\n" , __func__); - }else if (IS_ERR (cs35l33->reset_gpio)) { +if (IS_ERR (cs35l33->reset_gpio)) {dev_err (&i2c_client->dev,"%s ERROR: Can't get reset GPIO\n" , __func__);return PTR_ERR (cs35l33->reset_gpio);
Signature · 1 line
2.5.0
PATCH 2/2 ASoC: cs35l33: Fix display revision id
--- sound/soc/codecs/cs35l33.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
sound/soc/codecs/cs35l33.c +1 -1
@@ -1219,7 +1219,7 @@ static int cs35l33_i2c_probe(struct i2c_client *i2c_client, }dev_info (&i2c_client->dev, -"Cirrus Logic CS35L33, Revision: %02X\n" , ret &0xFF ); +"Cirrus Logic CS35L33, Revision: %02X\n" , reg &0xFF ); ret =regmap_register_patch (cs35l33->regmap, cs35l33_patch,ARRAY_SIZE (cs35l33_patch));
Signature · 1 line
2.5.0
Re: [PATCH 2/2] ASoC: cs35l33: Fix display revision id
Quoted 18 lines · Axel Lin
Signed-off-by Axel Lin <[email protected]>---
sound/soc/codecs/cs35l33.c| 2 +-1 file changed, 1 insertion(+), 1 deletion(-)sound/soc/codecs/cs35l33.c +1
-1@@ -1219,7 +1219,7 @@ static int cs35l33_i2c_probe(struct i2c_client *i2c_client, }dev_info (&i2c_client->dev, -"Cirrus Logic CS35L33, Revision: %02X\n" , ret &0xFF ); +"Cirrus Logic CS35L33, Revision: %02X\n" , reg &0xFF ); ret = regmap_register_patch(cs35l33->regmap,
Quoted 1 line
cs35l33_patch, ARRAY_SIZE(cs35l33_patch));
Mark Brown
maintainerApplied "ASoC: cs35l33: Fix display revision id" to the asoc tree
In reply to Axel LinThe patch
ASoC: cs35l33: Fix display revision id
has been applied to the asoc tree at
git://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
Quoted 1 line
From
5d78b027c0d22589d535b3657700e7ff6499d3edMon Sep 17 00:00:00 2001
From: Axel Lin <[email protected]>
Date: Thu, 30 Jun 2016 08:14:30 +0800
Subject: [PATCH] ASoC: cs35l33: Fix display revision id
--- sound/soc/codecs/cs35l33.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
sound/soc/codecs/cs35l33.c +1 -1
@@ -1219,7 +1219,7 @@ static int cs35l33_i2c_probe(struct i2c_client *i2c_client, }dev_info (&i2c_client->dev, -"Cirrus Logic CS35L33, Revision: %02X\n" , ret &0xFF ); +"Cirrus Logic CS35L33, Revision: %02X\n" , reg &0xFF ); ret =regmap_register_patch (cs35l33->regmap, cs35l33_patch,ARRAY_SIZE (cs35l33_patch));
Signature · 1 line
2.8.1
Quoted 25 lines · Axel Lin
devm_gpiod_get_optional()returns NULL when the gpio is not assigned. So the if (PTR_ERR(cs35l33->reset_gpio)==-ENOENT) test is always false.Signed-off-by Axel Lin <[email protected]>---
sound/soc/codecs/cs35l33.c| 6 +-----1 file changed, 1 insertion(+), 5 deletions(-)sound/soc/codecs/cs35l33.c +1
-5@@ -1176,11 +1176,7 @@ static int cs35l33_i2c_probe(struct i2c_client *i2c_client,/* We could issue !RST or skip it based on AMP topology */ cs35l33->reset_gpio =devm_gpiod_get_optional (&i2c_client->dev,"reset-gpios" ,GPIOD_OUT_HIGH ); - -if (PTR_ERR (cs35l33->reset_gpio) == -ENOENT ) { -dev_warn (&i2c_client->dev, -"%s WARNING: No reset gpio assigned\n" , __func__); - }else if (IS_ERR (cs35l33->reset_gpio)) { +if (IS_ERR (cs35l33->reset_gpio)) {dev_err (&i2c_client->dev,"%s ERROR: Can't get reset GPIO\n" , __func__);
Quoted 1 line
return PTR_ERR(cs35l33->reset_gpio)
Mark Brown
maintainerApplied "ASoC: cs35l33: Fix testing return value of devm_gpiod_get_optional" to the asoc tree
In reply to Axel LinThe patch
ASoC: cs35l33: Fix testing return value of devm_gpiod_get_optional
has been applied to the asoc tree at
git://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
Quoted 1 line
From
410fe39c6d2116aa5584083cbcbb7b3796e09f5dMon Sep 17 00:00:00 2001
From: Axel Lin <[email protected]>
Date: Thu, 30 Jun 2016 08:13:34 +0800
Subject: [PATCH] ASoC: cs35l33: Fix testing return value of
devm_gpiod_get_optional
devm_gpiod_get_optional() returns NULL when the gpio is not assigned. So the if (PTR_ERR(cs35l33->reset_gpio) == -ENOENT) test is always false.
--- sound/soc/codecs/cs35l33.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-)
sound/soc/codecs/cs35l33.c +1 -5
@@ -1176,11 +1176,7 @@ static int cs35l33_i2c_probe(struct i2c_client *i2c_client,/* We could issue !RST or skip it based on AMP topology */ cs35l33->reset_gpio =devm_gpiod_get_optional (&i2c_client->dev,"reset-gpios" ,GPIOD_OUT_HIGH ); - -if (PTR_ERR (cs35l33->reset_gpio) == -ENOENT ) { -dev_warn (&i2c_client->dev, -"%s WARNING: No reset gpio assigned\n" , __func__); - }else if (IS_ERR (cs35l33->reset_gpio)) { +if (IS_ERR (cs35l33->reset_gpio)) {dev_err (&i2c_client->dev,"%s ERROR: Can't get reset GPIO\n" , __func__);return PTR_ERR (cs35l33->reset_gpio);
Signature · 1 line
2.8.1