summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2014-04-18 10:19:01 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2014-04-18 10:19:01 -0700
commit345ef87b3741351a1b068a8b4828eb9d188b03f1 (patch)
treee15fe5e29c0dbf78e373df6fa31ade2ae5a831b8 /drivers
parent962bf3eadfb62d1d15df59e43499ef82036ea878 (diff)
parent20cd477c398decd6a8461ac48609b6c0ab4c7567 (diff)
Merge tag 'dt-fixes-for-3.15' of git://git.kernel.org/pub/scm/linux/kernel/git/robh/linux
Pull devicetree fixes from Rob Herring: - fix error handling in of_update_property - fix section mismatch warnings in __reserved_mem_check_root - add empty of_find_node_by_path for !OF builds - add various missing binding documentation * tag 'dt-fixes-for-3.15' of git://git.kernel.org/pub/scm/linux/kernel/git/robh/linux: of: add empty of_find_node_by_path() for !OF of: Clean up of_update_property DT: add vendor prefix for EBV Elektronik of: Fix the section mismatch warnings. of: Add vendor prefix for Digi International Inc. DT: I2C: Add trivial bindings used by kirkwood boards DT: Vendor: Add prefixes used by Kirkwood devices DT: bindings: add missing Marvell Kirkwood SoC documentation dt-bindings: add vendor-prefix for Newhaven Display of: add vendor prefix for I2SE GmbH of: add vendor prefix for ISEE 2007 S.L.
Diffstat (limited to 'drivers')
-rw-r--r--drivers/of/base.c10
-rw-r--r--drivers/of/fdt.c2
2 files changed, 4 insertions, 8 deletions
diff --git a/drivers/of/base.c b/drivers/of/base.c
index f72d19b7e5d2..6d4ee22708c9 100644
--- a/drivers/of/base.c
+++ b/drivers/of/base.c
@@ -1828,17 +1828,13 @@ int of_update_property(struct device_node *np, struct property *newprop)
next = &(*next)->next;
}
raw_spin_unlock_irqrestore(&devtree_lock, flags);
- if (rc)
- return rc;
+ if (!found)
+ return -ENODEV;
/* Update the sysfs attribute */
- if (oldprop)
- sysfs_remove_bin_file(&np->kobj, &oldprop->attr);
+ sysfs_remove_bin_file(&np->kobj, &oldprop->attr);
__of_add_property_sysfs(np, newprop);
- if (!found)
- return -ENODEV;
-
return 0;
}
diff --git a/drivers/of/fdt.c b/drivers/of/fdt.c
index fa16a912a927..7a2ef7bb8022 100644
--- a/drivers/of/fdt.c
+++ b/drivers/of/fdt.c
@@ -491,7 +491,7 @@ static int __init __reserved_mem_reserve_reg(unsigned long node,
* in /reserved-memory matches the values supported by the current implementation,
* also check if ranges property has been provided
*/
-static int __reserved_mem_check_root(unsigned long node)
+static int __init __reserved_mem_check_root(unsigned long node)
{
__be32 *prop;