Skip to content

Commit 161e7e4

Browse files
Zijun Hurobherring
authored andcommitted
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 <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Rob Herring (Arm) <[email protected]>
1 parent b418383 commit 161e7e4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/of/platform.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -334,7 +334,7 @@ static int of_platform_bus_create(struct device_node *bus,
334334
int rc = 0;
335335

336336
/* Make sure it has a compatible property */
337-
if (strict && (!of_get_property(bus, "compatible", NULL))) {
337+
if (strict && (!of_property_present(bus, "compatible"))) {
338338
pr_debug("%s() - skipping %pOF, no compatible prop\n",
339339
__func__, bus);
340340
return 0;

0 commit comments

Comments
 (0)