diff options
author | Krishna Reddy <vdumpa@nvidia.com> | 2019-05-22 16:17:11 +0530 |
---|---|---|
committer | Rob Herring <robh@kernel.org> | 2019-05-24 15:53:23 -0500 |
commit | d698a388146c5ba72e7cf7e79f13932f2046bf29 (patch) | |
tree | 5876087fd0d2b98a351369a475099cefdc0287f5 /drivers/of | |
parent | 2496f17772f757ba7a58c2abc1cdfdaf7cca29fb (diff) |
of: reserved-memory: ignore disabled memory-region nodes
Ignore disabled nodes in the memory-region
nodes list and continue to initialize the rest
of enabled nodes.
Check if the "reserved-memory" node is available
and if it's not available, return 0 to ignore the
"reserved-memory" node and continue parsing with
next node in memory-region nodes list.
Signed-off-by: Krishna Reddy <vdumpa@nvidia.com>
Signed-off-by: Puneet Saxena <puneets@nvidia.com>
Signed-off-by: Rob Herring <robh@kernel.org>
Diffstat (limited to 'drivers/of')
-rw-r--r-- | drivers/of/of_reserved_mem.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/of/of_reserved_mem.c b/drivers/of/of_reserved_mem.c index 89e190e94af7..7989703b883c 100644 --- a/drivers/of/of_reserved_mem.c +++ b/drivers/of/of_reserved_mem.c @@ -324,6 +324,9 @@ int of_reserved_mem_device_init_by_idx(struct device *dev, if (!target) return -ENODEV; + if (!of_device_is_available(target)) + return 0; + rmem = __find_rmem(target); of_node_put(target); |