From c526a280dcd1ba1ef85a59da98ffaf904b39bc57 Mon Sep 17 00:00:00 2001 From: Vasant Hegde Date: Thu, 28 Feb 2019 11:14:43 +0530 Subject: hdata/memory: Fix warning message Even though we added memory to device tree, we are getting below warning. Sample log: [ 57.136949696,3] Unable to use memory range 0 from MSAREA 0 [ 57.137049753,3] Unable to use memory range 0 from MSAREA 1 [ 57.137152335,3] Unable to use memory range 0 from MSAREA 2 [ 57.137251218,3] Unable to use memory range 0 from MSAREA 3 Fixes: 4822a7ba (hdata/memory: Add NVDIMM support) CC: Oliver O'Halloran Signed-off-by: Vasant Hegde Reviewed-by: Oliver O'Halloran Signed-off-by: Stewart Smith --- hdata/memory.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'hdata') diff --git a/hdata/memory.c b/hdata/memory.c index 1ac03c13..a85f4eba 100644 --- a/hdata/memory.c +++ b/hdata/memory.c @@ -608,7 +608,7 @@ static void get_msareas(struct dt_node *root, status = GETFIELD(PHYS_ATTR_STATUS_MASK, attr); } - if (add_address_range(root, id, arange, type, status)) + if (!add_address_range(root, id, arange, type, status)) prerror("Unable to use memory range %d from MSAREA %d\n", j, i); arange = (void *)arange + be32_to_cpu(arr->esize); -- cgit v1.2.1