Skip to content

Commit

Permalink
vmalloc.c: fix double error checking
Browse files Browse the repository at this point in the history
There is no need for double error checking.

Signed-off-by: Figo.zhang <figo1802@gmail.com>
Acked-by: Tejun Heo <tj@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
  • Loading branch information
Figo.zhang authored and Linus Torvalds committed Sep 22, 2009
1 parent 945a111 commit bf88c8c
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions mm/vmalloc.c
Original file line number Diff line number Diff line change
Expand Up @@ -168,11 +168,9 @@ static int vmap_page_range_noflush(unsigned long start, unsigned long end,
next = pgd_addr_end(addr, end);
err = vmap_pud_range(pgd, addr, next, prot, pages, &nr);
if (err)
break;
return err;
} while (pgd++, addr = next, addr != end);

if (unlikely(err))
return err;
return nr;
}

Expand Down

0 comments on commit bf88c8c

Please sign in to comment.