[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <YLX9FCOU0Il8Ejoy@mwanda>
Date: Tue, 1 Jun 2021 12:25:40 +0300
From: Dan Carpenter <dan.carpenter@...cle.com>
To: Mike Kravetz <mike.kravetz@...cle.com>,
Mina Almasry <almasrymina@...gle.com>
Cc: Andrew Morton <akpm@...ux-foundation.org>,
Stephen Rothwell <sfr@...b.auug.org.au>, linux-mm@...ck.org,
linux-kernel@...r.kernel.org, kernel-janitors@...r.kernel.org
Subject: [PATCH] mm: hugetlb: checking for IS_ERR() instead of NULL
The alloc_migrate_huge_page() doesn't return error pointers, it returns
NULL.
Fixes: ab45bc8b5910 ("mm, hugetlb: fix resv_huge_pages underflow on UFFDIO_COPY")
Signed-off-by: Dan Carpenter <dan.carpenter@...cle.com>
---
mm/hugetlb.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/mm/hugetlb.c b/mm/hugetlb.c
index 69a4b551c157..3221c94b4749 100644
--- a/mm/hugetlb.c
+++ b/mm/hugetlb.c
@@ -5103,7 +5103,7 @@ int hugetlb_mcopy_atomic_pte(struct mm_struct *dst_mm,
*/
page = alloc_migrate_huge_page(h, gfp_mask, node,
nodemask);
- if (IS_ERR(page)) {
+ if (!page) {
ret = -ENOMEM;
goto out;
}
--
2.30.2
Powered by blists - more mailing lists