Re: [PATCH] vmalloc.c: fix double error checking

From: Tejun Heo
Date: Tue Jul 07 2009 - 20:19:38 EST


Figo.zhang wrote:
> it is no need for double error checking.
>
> Signed-off-by: Figo.zhang <figo1802@xxxxxxxxx>
> - err = vmap_pud_range(pgd, addr, next, prot, pages, &nr);
> - if (err)
> - break;
> + if (vmap_pud_range(pgd, addr, next, prot, pages, &nr))
> + return -ENOMEM;

Wouldn't it be better to keep the error return value?

Thanks.

--
tejun
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/