/* @np: device node from which the property value is to be read. @propname: name of the property to be searched. @len: requested length of property value */
static void* of_find_property_value_of_size(const struct device_node *np, const char *propname, u32 len)
/* @np: device node from which the property value is to be read. @propname: name of the property to be searched. @len: requested length of property value */
static void* of_find_property_value_of_size(const struct device_node *np, const char *propname, u32 len)
{
	struct property *prop = of_find_property(np, propname, NULL);
	if (!prop)
		return ERR_PTR(-EINVAL);
	if (!prop->value)
		return ERR_PTR(-ENODATA);
	if (len > prop->length)
		return ERR_PTR(-EOVERFLOW);
	return prop->value;
}