ASoC: samsung: odroid: use of_property_present to check for property

"samsung,audio-widgets" and "samsung,audio-routing" are not boolean
properties, thus more appropriate is to use of_property_present() to
check if they are present.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Link: https://lore.kernel.org/r/20230810063300.20151-7-krzysztof.kozlowski@linaro.org
Signed-off-by: Mark Brown <broonie@kernel.org>
This commit is contained in:
Krzysztof Kozlowski 2023-08-10 08:32:55 +02:00 committed by Mark Brown
parent 631e9d4b1f
commit ebba2fd5ad
No known key found for this signature in database
GPG Key ID: 24D68B725D5487D0

View File

@ -223,14 +223,14 @@ static int odroid_audio_probe(struct platform_device *pdev)
if (ret < 0)
return ret;
if (of_property_read_bool(dev->of_node, "samsung,audio-widgets")) {
if (of_property_present(dev->of_node, "samsung,audio-widgets")) {
ret = snd_soc_of_parse_audio_simple_widgets(card,
"samsung,audio-widgets");
if (ret < 0)
return ret;
}
if (of_property_read_bool(dev->of_node, "samsung,audio-routing")) {
if (of_property_present(dev->of_node, "samsung,audio-routing")) {
ret = snd_soc_of_parse_audio_routing(card,
"samsung,audio-routing");
if (ret < 0)