arm64/numa: Unify common error path in numa_init()
authorAnshuman Khandual <anshuman.khandual@arm.com>
Sat, 22 Sep 2018 15:39:56 +0000 (21:09 +0530)
committerCatalin Marinas <catalin.marinas@arm.com>
Mon, 1 Oct 2018 12:49:52 +0000 (13:49 +0100)
commit52338088ef0569290b7eae0759c58a3de494e6c0
tree1480efe84b6eb94179ad73bc48c396579b93624c
parent77cfe950901e5c13aca2df6437a05f39dd9a929b
arm64/numa: Unify common error path in numa_init()

At present numa_free_distance() is being called before numa_distance is
even initialized with numa_alloc_distance() which is really pointless.
Instead lets call numa_free_distance() on the common error path inside
numa_init() after numa_alloc_distance() has been successful.

Fixes: 1a2db30034 ("arm64, numa: Add NUMA support for arm64 platforms")
Acked-by: Punit Agrawal <punit.agrawal@arm.com>
Signed-off-by: Anshuman Khandual <anshuman.khandual@arm.com>
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
arch/arm64/mm/numa.c