ASoC: Use of_property_present()
Subsystems (3)
PATCH 1/1 ASoC: Use of_property_present()
Use of_property_present() to test for property presence rather than of_get_property(). This is part of a larger effort to remove callers of of_get_property() and similar functions. of_get_property() leaks the DT property data pointer which is a problem for dynamically allocated nodes which may be freed.
--- sound/soc/fsl/mpc5200_psc_i2s.c | 2 +- sound/soc/tegra/tegra_pcm.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)
sound/soc/fsl/mpc5200_psc_i2s.c +1 -1
@@ -184,7 +184,7 @@ static int psc_i2s_of_probe(struct platform_device *op)/* Check for the codec handle. If it is not present then we * are done */ -if (!of_get_property (op->dev.of_node,"codec-handle" ,NULL )) +if (!of_property_present (op->dev.of_node,"codec-handle" ))return 0 ;/* Due to errata in the dma mode; need to line up enabling
sound/soc/tegra/tegra_pcm.c +1 -1
@@ -213,7 +213,7 @@ int tegra_pcm_construct(struct snd_soc_component *component,* Fallback for backwards-compatibility with older device trees that * have the iommus property in the virtual, top-level "sound" node. */ -if (!of_get_property (dev->of_node,"iommus" ,NULL )) +if (!of_property_present (dev->of_node,"iommus" )) dev = rtd->card->snd_card->dev;return tegra_pcm_dma_allocate (dev, rtd, tegra_pcm_hardware.buffer_bytes_max);
Signature · 1 line
2.43.0
Mark Brown
maintainerQuoted 8 lines · Rob Herring (Arm)
Use
of_property_present()to test for property presence rather thanof_get_property(). This is part of a larger effort to remove callers ofof_get_property()and similar functions.of_get_property()leaks the DT property data pointer which is a problem for dynamically allocated nodes which may be freed.[...]
Applied to
https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-next
Thanks!
[1/1] ASoC: Use of_property_present()
commit: a1c8929b0ebbfd7598f038ac74fb0a28f94ade8c
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