Skip to contentSkip to conversation

ASoC: tegra: Fix a NULL vs IS_ERR() check

PATCH In review Dan Carpenter 3 participants 3 messages Jun 18, 2021 – Jun 21, 2021

Subsystems (4)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ASoC: tegra: Fix a NULL vs IS_ERR() check

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

Fixes cc8f70f56039 ("ASoC: tegra: Unify ASoC machine drivers")
---
 sound/soc/tegra/tegra_asoc_machine.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
sound/soc/tegra/tegra_asoc_machine.c +1 -1
index a53aec361a77..735909310a26 100644
@@ -409,7 +409,7 @@ int tegra_asoc_machine_probe(struct platform_device *pdev)
 		return PTR_ERR(np_codec);
 
 	np_i2s = tegra_machine_parse_phandle(dev, "nvidia,i2s-controller");
-	if (!np_i2s)
+	if (IS_ERR(np_i2s))
 		return PTR_ERR(np_i2s);
 
 	card->dai_link->cpus->of_node = np_i2s;
Signature · 1 line
2.30.2
Reviewed-by on v1 1/1
#1 lore raw

18.06.2021 16:44, Dan Carpenter пишет:

Quoted 15 lines

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

Fixes cc8f70f56039 ("ASoC: tegra: Unify ASoC machine drivers")
---
 sound/soc/tegra/tegra_asoc_machine.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
sound/soc/tegra/tegra_asoc_machine.c +0 -0
index a53aec361a77..735909310a26 100644

sound/soc/tegra/tegra_asoc_machine.c int tegra_asoc_machine_probe(struct platform_device *pdev) · line 415

Quoted 8 lines
sound/soc/tegra/tegra_asoc_machine.c +1 -1
@@ -409,7 +409,7 @@ int tegra_asoc_machine_probe(struct platform_device *pdev)
 		return PTR_ERR(np_codec);
 
 	np_i2s = tegra_machine_parse_phandle(dev, "nvidia,i2s-controller");
-	if (!np_i2s)
+	if (IS_ERR(np_i2s))
 		return PTR_ERR(np_i2s);
 
 	card->dai_link->cpus->of_node = np_i2s;
maintainer
#2 lore raw
In reply to Dan Carpenter
Quoted 2 lines · Dan Carpenter

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

Applied to

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

Thanks!

[1/1] ASoC: tegra: Fix a NULL vs IS_ERR() check

      commit: 3aed3ddf9639a4f915984177ff8a2253f3f8acfe

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