int err = 0;
propval = kmalloc(rprop->length, GFP_KERNEL);
- if (!propval) {
- pr_err("%s: Could not copy value of '%s'\n",
- __func__, rprop->name);
+ if (!propval)
return -ENOMEM;
- }
memcpy(propval, rprop->value, rprop->length);
propend = propval + rprop->length;
nodestr = propcur;
s = strchr(propcur, ':');
if (!s) {
- pr_err("%s: Illegal symbol entry '%s' (1)\n",
- __func__, propcur);
err = -EINVAL;
goto err_fail;
}
propstr = s;
s = strchr(s, ':');
if (!s) {
- pr_err("%s: Illegal symbol entry '%s' (2)\n",
- __func__, (char *)rprop->value);
err = -EINVAL;
goto err_fail;
}
*s++ = '\0';
err = kstrtoint(s, 10, &offset);
- if (err != 0) {
- pr_err("%s: Could get offset '%s'\n",
- __func__, (char *)rprop->value);
+ if (err != 0)
goto err_fail;
- }
refnode = __of_find_node_by_full_name(node, nodestr);
- if (!refnode) {
- pr_warn("%s: Could not find refnode '%s'\n",
- __func__, (char *)rprop->value);
+ if (!refnode)
continue;
- }
for_each_property_of_node(refnode, sprop) {
if (of_prop_cmp(sprop->name, propstr) == 0)
of_node_put(refnode);
if (!sprop) {
- pr_err("%s: Could not find property '%s'\n",
- __func__, (char *)rprop->value);
err = -ENOENT;
goto err_fail;
}
of_prop_cmp(rprop->name, "linux,phandle") == 0)
continue;
- if ((rprop->length % 4) != 0 || rprop->length == 0) {
- pr_err("%s: Illegal property (size) '%s' @%s\n",
- __func__, rprop->name, node->full_name);
+ if ((rprop->length % 4) != 0 || rprop->length == 0)
return -EINVAL;
- }
count = rprop->length / sizeof(__be32);
for_each_property_of_node(target, sprop) {
break;
}
- if (sprop == NULL) {
- pr_err("%s: Could not find target property '%s' @%s\n",
- __func__, rprop->name, node->full_name);
+ if (sprop == NULL)
return -EINVAL;
- }
for (i = 0; i < count; i++) {
off = be32_to_cpu(((__be32 *)rprop->value)[i]);
- if (off >= sprop->length ||
- (off + 4) > sprop->length) {
- pr_err("%s: Illegal property '%s' @%s\n",
- __func__, rprop->name,
- node->full_name);
+ if (off >= sprop->length || (off + 4) > sprop->length)
return -EINVAL;
- }
if (phandle_delta) {
phandle = be32_to_cpu(*(__be32 *)(sprop->value + off));
if (__of_node_name_cmp(child, childtarget) == 0)
break;
- if (!childtarget) {
- pr_err("%s: Could not find target child '%s' @%s\n",
- __func__, child->name, node->full_name);
+ if (!childtarget)
return -EINVAL;
- }
err = __of_adjust_tree_phandle_references(child, childtarget,
phandle_delta);
err = of_property_read_string(root_sym,
rprop->name, &refpath);
- if (err != 0) {
- pr_err("%s: Could not find symbol '%s'\n",
- __func__, rprop->name);
+ if (err != 0)
goto out;
- }
refnode = of_find_node_by_path(refpath);
if (!refnode) {
- pr_err("%s: Could not find node by path '%s'\n",
- __func__, refpath);
err = -ENOENT;
goto out;
}
phandle = refnode->phandle;
of_node_put(refnode);
- pr_debug("%s: %s phandle is 0x%08x\n",
- __func__, rprop->name, phandle);
-
err = __of_adjust_phandle_ref(resolve, rprop, phandle);
if (err)
break;