aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86
diff options
context:
space:
mode:
Diffstat (limited to 'arch/x86')
-rw-r--r--arch/x86/mm/numa_64.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/arch/x86/mm/numa_64.c b/arch/x86/mm/numa_64.c
index 8ce617735900..1bd6de4aa714 100644
--- a/arch/x86/mm/numa_64.c
+++ b/arch/x86/mm/numa_64.c
@@ -371,11 +371,13 @@ static void __init numa_reset_distance(void)
371{ 371{
372 size_t size; 372 size_t size;
373 373
374 size = numa_distance_cnt * sizeof(numa_distance[0]); 374 if (numa_distance_cnt) {
375 memblock_x86_free_range(__pa(numa_distance), 375 size = numa_distance_cnt * sizeof(numa_distance[0]);
376 __pa(numa_distance) + size); 376 memblock_x86_free_range(__pa(numa_distance),
377 __pa(numa_distance) + size);
378 numa_distance_cnt = 0;
379 }
377 numa_distance = NULL; 380 numa_distance = NULL;
378 numa_distance_cnt = 0;
379} 381}
380 382
381/* 383/*