[PATCH] Modify the check condition

From: cgel . zte
Date: Sat Sep 18 2021 - 02:16:16 EST


From: Yang Guang <yang.guang5@xxxxxxxxxx>

The numa_distance is NULL or numa_alloc_distance() return error
state, It should return. So the "&&" should been changed to "||".

Signed-off-by: Yang Guang <yang.guang5@xxxxxxxxxx>
---
arch/x86/mm/numa.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/x86/mm/numa.c b/arch/x86/mm/numa.c
index 1e9b93b088db..fa73648aeeb0 100644
--- a/arch/x86/mm/numa.c
+++ b/arch/x86/mm/numa.c
@@ -419,7 +419,7 @@ static int __init numa_alloc_distance(void)
*/
void __init numa_set_distance(int from, int to, int distance)
{
- if (!numa_distance && numa_alloc_distance() < 0)
+ if (!numa_distance || numa_alloc_distance() < 0)
return;

if (from >= numa_distance_cnt || to >= numa_distance_cnt ||
--
2.25.1