Skip to content

Commit b418383

Browse files
Zijun Hurobherring
authored andcommitted
of: Correct property name comparison in __of_add_property()
__of_add_property() compares property name by strcmp(), and that is improper for SPARC which wants strcasecmp(). Fix by using dedicated property name comparison macro of_prop_cmp(). Signed-off-by: Zijun Hu <quic_zijuhu@quicinc.com> Link: https://lore.kernel.org/r/20250224-of_bugfix-v1-3-03640ae8c3a6@quicinc.com Signed-off-by: Rob Herring (Arm) <robh@kernel.org>
1 parent f443029 commit b418383

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

drivers/of/base.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1651,7 +1651,7 @@ int __of_add_property(struct device_node *np, struct property *prop)
16511651
prop->next = NULL;
16521652
next = &np->properties;
16531653
while (*next) {
1654-
if (strcmp(prop->name, (*next)->name) == 0) {
1654+
if (of_prop_cmp(prop->name, (*next)->name) == 0) {
16551655
/* duplicate ! don't insert it */
16561656
rc = -EEXIST;
16571657
goto out_unlock;

0 commit comments

Comments
 (0)