diff --git a/mm/hmm.c b/mm/hmm.c index ea19742a5d60b1a6270629a024d88a13b9c5f3c1..979211c7ccc81d30af4cf18cd2830d2cb1a12828 100644 --- a/mm/hmm.c +++ b/mm/hmm.c @@ -418,7 +418,7 @@ static int hmm_vma_walk_pmd(pmd_t *pmdp, } if (!pte_present(pte)) { - swp_entry_t entry; + swp_entry_t entry = pte_to_swp_entry(pte); if (!non_swap_entry(entry)) { if (hmm_vma_walk->fault) @@ -426,8 +426,6 @@ static int hmm_vma_walk_pmd(pmd_t *pmdp, continue; } - entry = pte_to_swp_entry(pte); - /* * This is a special swap entry, ignore migration, use * device and report anything else as error.