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: Use typed accessors rather than of_get_property()

Use the typed of_property_* functions rather than of_get_property()
which leaks pointers to DT data without any control of the lifetime.

Signed-off-by: "Rob Herring (Arm)" <robh@kernel.org>
Link: https://lore.kernel.org/r/20250312212937.1067088-1-robh@kernel.org
Signed-off-by: Rob Herring (Arm) <robh@kernel.org>

+3 -3
+3 -3
drivers/of/platform.c
··· 536 536 * ignore errors for the rest. 537 537 */ 538 538 for_each_node_by_type(node, "display") { 539 - if (!of_get_property(node, "linux,opened", NULL) || 540 - !of_get_property(node, "linux,boot-display", NULL)) 539 + if (!of_property_read_bool(node, "linux,opened") || 540 + !of_property_read_bool(node, "linux,boot-display")) 541 541 continue; 542 542 dev = of_platform_device_create(node, "of-display", NULL); 543 543 of_node_put(node); ··· 551 551 char buf[14]; 552 552 const char *of_display_format = "of-display.%d"; 553 553 554 - if (!of_get_property(node, "linux,opened", NULL) || node == boot_display) 554 + if (!of_property_read_bool(node, "linux,opened") || node == boot_display) 555 555 continue; 556 556 ret = snprintf(buf, sizeof(buf), of_display_format, display_number++); 557 557 if (ret < sizeof(buf))