Messages in this thread Patch in this message | | | From | cgel.zte@gmail ... | Subject | [PATCH] Modify the check condition | Date | Sat, 18 Sep 2021 06:15:57 +0000 |
| |
From: Yang Guang <yang.guang5@zte.com.cn>
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@zte.com.cn> --- 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
| |