From 8665bd53f2f2e27e5511d90428cb3f60e6d0ce15 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sat, 18 May 2024 20:50:12 +0200 Subject: Merging upstream version 6.8.9. Signed-off-by: Daniel Baumann --- drivers/of/property.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'drivers/of/property.c') diff --git a/drivers/of/property.c b/drivers/of/property.c index 15d1156843..fa8cd33be1 100644 --- a/drivers/of/property.c +++ b/drivers/of/property.c @@ -441,6 +441,7 @@ int of_property_read_string(const struct device_node *np, const char *propname, const char **out_string) { const struct property *prop = of_find_property(np, propname, NULL); + if (!prop) return -EINVAL; if (!prop->length) @@ -1189,9 +1190,9 @@ static struct device_node *parse_##fname(struct device_node *np, \ * * @parse_prop: function name * parse_prop() finds the node corresponding to a supplier phandle - * @parse_prop.np: Pointer to device node holding supplier phandle property - * @parse_prop.prop_name: Name of property holding a phandle value - * @parse_prop.index: For properties holding a list of phandles, this is the + * parse_prop.np: Pointer to device node holding supplier phandle property + * parse_prop.prop_name: Name of property holding a phandle value + * parse_prop.index: For properties holding a list of phandles, this is the * index into the list * @get_con_dev: If the consumer node containing the property is never converted * to a struct device, implement this ops so fw_devlink can use it -- cgit v1.2.3