Skip to content

Commit d0977ef

Browse files
MiaoheLintorvalds
authored andcommitted
mm/hmm.c: remove unneeded local variable ret
The local variable ret is always 0. Remove it to make code more tight. Link: https://lkml.kernel.org/r/20220125124833.39718-1-linmiaohe@huawei.com Signed-off-by: Miaohe Lin <linmiaohe@huawei.com> Reviewed-by: Muchun Song <songmuchun@bytedance.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
1 parent 737b6a1 commit d0977ef

1 file changed

Lines changed: 1 addition & 2 deletions

File tree

mm/hmm.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -417,7 +417,6 @@ static int hmm_vma_walk_pud(pud_t *pudp, unsigned long start, unsigned long end,
417417
struct hmm_range *range = hmm_vma_walk->range;
418418
unsigned long addr = start;
419419
pud_t pud;
420-
int ret = 0;
421420
spinlock_t *ptl = pud_trans_huge_lock(pudp, walk->vma);
422421

423422
if (!ptl)
@@ -466,7 +465,7 @@ static int hmm_vma_walk_pud(pud_t *pudp, unsigned long start, unsigned long end,
466465

467466
out_unlock:
468467
spin_unlock(ptl);
469-
return ret;
468+
return 0;
470469
}
471470
#else
472471
#define hmm_vma_walk_pud NULL

0 commit comments

Comments
 (0)