summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZijun Hu <quic_zijuhu@quicinc.com>2025-02-24 22:28:01 +0800
committerRob Herring (Arm) <robh@kernel.org>2025-02-25 13:58:46 -0600
commit161e7e4671e6eb09b1d9ae61dbcf48f4c2b337b7 (patch)
tree1aca47e883e52edb21fc5b06cc9e90f9e3b9371e
parentb41838312e24f69d28d1b81c9b9beef55f31215d (diff)
of/platform: Do not use of_get_property() to test property presence
Use of_property_present() instead of of_get_property() to test property 'compatible' presence in of_platform_bus_create(). Signed-off-by: Zijun Hu <quic_zijuhu@quicinc.com> Link: https://lore.kernel.org/r/20250224-of_bugfix-v1-5-03640ae8c3a6@quicinc.com Signed-off-by: Rob Herring (Arm) <robh@kernel.org>
-rw-r--r--drivers/of/platform.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/of/platform.c b/drivers/of/platform.c
index c6d8afb284e8..242172e4b875 100644
--- a/drivers/of/platform.c
+++ b/drivers/of/platform.c
@@ -334,7 +334,7 @@ static int of_platform_bus_create(struct device_node *bus,
int rc = 0;
/* Make sure it has a compatible property */
- if (strict && (!of_get_property(bus, "compatible", NULL))) {
+ if (strict && (!of_property_present(bus, "compatible"))) {
pr_debug("%s() - skipping %pOF, no compatible prop\n",
__func__, bus);
return 0;