projects
/
nvme.git
/ commitdiff
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
f443029
)
of: Correct property name comparison in __of_add_property()
author
Zijun Hu <quic_zijuhu@quicinc.com>
Mon, 24 Feb 2025 14:27:59 +0000
(22:27 +0800)
committer
Rob Herring (Arm) <robh@kernel.org>
Tue, 25 Feb 2025 19:58:46 +0000
(13:58 -0600)
__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>
drivers/of/base.c
patch
|
blob
|
history
diff --git
a/drivers/of/base.c
b/drivers/of/base.c
index 001ff6ce4abf85c07f13649d5a9f691f549a8ccc..c810014957e81171675b63f25eaabe391cc903e4 100644
(file)
--- 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 (
str
cmp(prop->name, (*next)->name) == 0) {
+ if (
of_prop_
cmp(prop->name, (*next)->name) == 0) {
/* duplicate ! don't insert it */
rc = -EEXIST;
goto out_unlock;