aboutsummaryrefslogtreecommitdiff
path: root/drivers/core/of_access.c
diff options
context:
space:
mode:
authorTom Rini <trini@konsulko.com>2023-07-20 21:31:31 -0400
committerTom Rini <trini@konsulko.com>2023-07-20 21:31:31 -0400
commite896279ac39ebb97f23e6132bf7668a61e1cd86b (patch)
tree24e035ebd13dbd272da4b3845a1dfcac66e4a86f /drivers/core/of_access.c
parent7fe5accb4516144b7abb8f183640cdf50423121e (diff)
parent24142ead21ed5e4d2d6f39dd410d91d815ea1ae2 (diff)
Merge tag 'dm-pull-20jul23' of https://source.denx.de/u-boot/custodians/u-boot-dm
binman mkimage and template enhancements misc fixes
Diffstat (limited to 'drivers/core/of_access.c')
-rw-r--r--drivers/core/of_access.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/core/of_access.c b/drivers/core/of_access.c
index 81a307992c..57f10445b1 100644
--- a/drivers/core/of_access.c
+++ b/drivers/core/of_access.c
@@ -593,11 +593,14 @@ int of_read_u64(const struct device_node *np, const char *propname, u64 *outp)
int of_property_match_string(const struct device_node *np, const char *propname,
const char *string)
{
- const struct property *prop = of_find_property(np, propname, NULL);
+ int len = 0;
+ const struct property *prop = of_find_property(np, propname, &len);
size_t l;
int i;
const char *p, *end;
+ if (!prop && len == -FDT_ERR_NOTFOUND)
+ return -ENOENT;
if (!prop)
return -EINVAL;
if (!prop->value)