Skip to content

Commit

Permalink
of: reserved-memory: ignore disabled memory-region nodes
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Krishna Reddy authored and Rob Herring committed May 24, 2019
1 parent 2496f17 commit d698a38
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions drivers/of/of_reserved_mem.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down

0 comments on commit d698a38

Please sign in to comment.