vmalloc.c: fix double error checking

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>
This commit is contained in:
Figo.zhang 2009-09-21 17:01:47 -07:00 committed by Linus Torvalds
parent 945a11136e
commit bf88c8c83e

View File

@ -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;
}