Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

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>

authored by

Zijun Hu and committed by
Rob Herring (Arm)
161e7e46 b4183831

+1 -1
+1 -1
drivers/of/platform.c
··· 334 334 int rc = 0; 335 335 336 336 /* Make sure it has a compatible property */ 337 - if (strict && (!of_get_property(bus, "compatible", NULL))) { 337 + if (strict && (!of_property_present(bus, "compatible"))) { 338 338 pr_debug("%s() - skipping %pOF, no compatible prop\n", 339 339 __func__, bus); 340 340 return 0;