diff options
Diffstat (limited to 'drivers/core/of_access.c')
-rw-r--r-- | drivers/core/of_access.c | 5 |
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) |