diff options
author | Rob Herring (Arm) <robh@kernel.org> | 2024-07-31 22:12:57 +0300 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2024-08-01 14:51:44 +0300 |
commit | a1c8929b0ebbfd7598f038ac74fb0a28f94ade8c (patch) | |
tree | 1b656437ed8a2851526d410c5017e80ab481fb6a /sound/soc/tegra | |
parent | d5742b5d4d7b99531e352ea814506641f9fc8981 (diff) | |
download | linux-a1c8929b0ebbfd7598f038ac74fb0a28f94ade8c.tar.xz |
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.
Signed-off-by: Rob Herring (Arm) <robh@kernel.org>
Link: https://patch.msgid.link/20240731191312.1710417-19-robh@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound/soc/tegra')
-rw-r--r-- | sound/soc/tegra/tegra_pcm.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sound/soc/tegra/tegra_pcm.c b/sound/soc/tegra/tegra_pcm.c index 4bdbcd2635ef..05d59e03b1c5 100644 --- a/sound/soc/tegra/tegra_pcm.c +++ b/sound/soc/tegra/tegra_pcm.c @@ -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); |