Re: [PATCH] mm/mmap.c: Remove redundant statement "error = -ENOMEM"

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 10/05, Chen Gang wrote:
>
> It is still a little better to remove it, although it should be skipped
> by "-O2".

Agreed, it can confuse the reader.

> Signed-off-by: Chen Gang <gang.chen.5i5j@xxxxxxxxx>

Acked-by: Oleg Nesterov <oleg@xxxxxxxxxx>

> ---
>  mm/mmap.c | 1 -
>  1 file changed, 1 deletion(-)
> 
> diff --git a/mm/mmap.c b/mm/mmap.c
> index 8393580..1da4600 100644
> --- a/mm/mmap.c
> +++ b/mm/mmap.c
> @@ -1562,7 +1562,6 @@ unsigned long mmap_region(struct file *file, unsigned long addr,
>  	}
>  
>  	/* Clear old maps */
> -	error = -ENOMEM;
>  	while (find_vma_links(mm, addr, addr + len, &prev, &rb_link,
>  			      &rb_parent)) {
>  		if (do_munmap(mm, addr, len))
> -- 
> 1.9.3
> 
>  		 	   		  


--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@xxxxxxxxx.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@xxxxxxxxx";> email@xxxxxxxxx </a>



[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]