diff options
author | Sascha Hauer <s.hauer@pengutronix.de> | 2017-02-13 09:26:04 +0100 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2017-02-13 09:26:04 +0100 |
commit | 30139163b75970fcd58df6b6b987883e36571046 (patch) | |
tree | 00bd354cefa617f8474cc73994b1a72c11e770a0 /drivers/of | |
parent | bb1a6a2fd3cc41be6db1a1362f311456019317b1 (diff) | |
parent | 19df384cec181be4407f82377ffbb3059b1ed748 (diff) | |
download | barebox-30139163b75970fcd58df6b6b987883e36571046.tar.gz barebox-30139163b75970fcd58df6b6b987883e36571046.tar.xz |
Merge branch 'for-next/imx'
Diffstat (limited to 'drivers/of')
-rw-r--r-- | drivers/of/partition.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/drivers/of/partition.c b/drivers/of/partition.c index bdf5945627..8c2aef2326 100644 --- a/drivers/of/partition.c +++ b/drivers/of/partition.c @@ -74,16 +74,16 @@ struct cdev *of_parse_partition(struct cdev *cdev, struct device_node *node) int of_parse_partitions(struct cdev *cdev, struct device_node *node) { - struct device_node *n; + struct device_node *n, *subnode; if (!node) return -EINVAL; - for_each_child_of_node(node, n) { - if (of_device_is_compatible(n, "fixed-partitions")) { - node = n; - break; - } + subnode = of_get_child_by_name(node, "partitions"); + if (subnode) { + if (!of_device_is_compatible(subnode, "fixed-partitions")) + return -EINVAL; + node = subnode; } for_each_child_of_node(node, n) { |