summaryrefslogtreecommitdiff
path: root/drivers/of
diff options
context:
space:
mode:
authorZijun Hu <quic_zijuhu@quicinc.com>2025-02-24 22:27:59 +0800
committerRob Herring (Arm) <robh@kernel.org>2025-02-25 13:58:46 -0600
commitb41838312e24f69d28d1b81c9b9beef55f31215d (patch)
tree03f65e018d528f15c1062d214f7c58b44f954286 /drivers/of
parentf443029c9a6e9515582ee2dfe7014a9be8a4a98a (diff)
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>
Diffstat (limited to 'drivers/of')
-rw-r--r--drivers/of/base.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/of/base.c b/drivers/of/base.c
index 001ff6ce4abf..c810014957e8 100644
--- a/drivers/of/base.c
+++ b/drivers/of/base.c
@@ -1651,7 +1651,7 @@ int __of_add_property(struct device_node *np, struct property *prop)
prop->next = NULL;
next = &np->properties;
while (*next) {
- if (strcmp(prop->name, (*next)->name) == 0) {
+ if (of_prop_cmp(prop->name, (*next)->name) == 0) {
/* duplicate ! don't insert it */
rc = -EEXIST;
goto out_unlock;