lkml.org 
[lkml]   [2009]   [Jul]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    Subject[PATCH v2] vmalloc.c: fix double error checking
    From
    Date
    it is no need for double error checking.

    in v2, if vmap_pud_ranger() error, directly return err.

    Signed-off-by: Figo.zhang <figo1802@gmail.com>
    ---
    mm/vmalloc.c | 4 +---
    1 files changed, 1 insertions(+), 3 deletions(-)

    diff --git a/mm/vmalloc.c b/mm/vmalloc.c
    index f8189a4..ed6b4b9 100644
    --- a/mm/vmalloc.c
    +++ b/mm/vmalloc.c
    @@ -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;
    }




    \
     
     \ /
      Last update: 2009-07-08 04:15    [W:0.033 / U:61.084 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site