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: 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>

authored by

Zijun Hu and committed by
Rob Herring (Arm)
b4183831 f443029c

+1 -1
+1 -1
drivers/of/base.c
··· 1651 1651 prop->next = NULL; 1652 1652 next = &np->properties; 1653 1653 while (*next) { 1654 - if (strcmp(prop->name, (*next)->name) == 0) { 1654 + if (of_prop_cmp(prop->name, (*next)->name) == 0) { 1655 1655 /* duplicate ! don't insert it */ 1656 1656 rc = -EEXIST; 1657 1657 goto out_unlock;