mirror of
https://github.com/torvalds/linux.git
synced 2026-04-18 06:44:00 -04:00
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>
This commit is contained in:
committed by
Rob Herring (Arm)
parent
b41838312e
commit
161e7e4671
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user