summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--kernel/memremap.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/kernel/memremap.c b/kernel/memremap.c
index 0d818ce04129..56fc4783879c 100644
--- a/kernel/memremap.c
+++ b/kernel/memremap.c
@@ -174,7 +174,7 @@ void *devm_memremap_pages(struct device *dev, struct resource *res)
nid = dev_to_node(dev);
if (nid < 0)
- nid = 0;
+ nid = numa_mem_id();
error = arch_add_memory(nid, res->start, resource_size(res), true);
if (error) {