Commit d698a388 authored by Krishna Reddy's avatar Krishna Reddy Committed by Rob Herring

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: default avatarKrishna Reddy <vdumpa@nvidia.com>
Signed-off-by: default avatarPuneet Saxena <puneets@nvidia.com>
Signed-off-by: default avatarRob Herring <robh@kernel.org>
parent 2496f177
...@@ -324,6 +324,9 @@ int of_reserved_mem_device_init_by_idx(struct device *dev, ...@@ -324,6 +324,9 @@ int of_reserved_mem_device_init_by_idx(struct device *dev,
if (!target) if (!target)
return -ENODEV; return -ENODEV;
if (!of_device_is_available(target))
return 0;
rmem = __find_rmem(target); rmem = __find_rmem(target);
of_node_put(target); of_node_put(target);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment