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 <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Rob Herring (Arm) <[email protected]>
1 parent f443029 commit b418383

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

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)