Commit bf88c8c83e4425d17e29daa5354ffb1f8ba7b225
Committed by
Linus Torvalds
1 parent
945a11136e
Exists in
master
and in
20 other branches
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>
Showing 1 changed file with 1 additions and 3 deletions Side-by-side Diff
mm/vmalloc.c
... | ... | @@ -168,11 +168,9 @@ |
168 | 168 | next = pgd_addr_end(addr, end); |
169 | 169 | err = vmap_pud_range(pgd, addr, next, prot, pages, &nr); |
170 | 170 | if (err) |
171 | - break; | |
171 | + return err; | |
172 | 172 | } while (pgd++, addr = next, addr != end); |
173 | 173 | |
174 | - if (unlikely(err)) | |
175 | - return err; | |
176 | 174 | return nr; |
177 | 175 | } |
178 | 176 |