Re: [PATCH 2/2] mm: memcontrol - uninitialised return value

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

 



On Wed,  5 May 2010 14:21:49 +0300
Phil Carmody <ext-phil.2.carmody@xxxxxxxxx> wrote:

> From: Phil Carmody <ext-phil.2.carmody@xxxxxxxxx>
> 
> Only an out of memory error will cause ret to be set.
> 
> Acked-by: Kirill A. Shutemov <kirill@xxxxxxxxxxxxx>
> Signed-off-by: Phil Carmody <ext-phil.2.carmody@xxxxxxxxx>
> ---
>  mm/memcontrol.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
> 
> diff --git a/mm/memcontrol.c b/mm/memcontrol.c
> index 90e32b2..09af773 100644
> --- a/mm/memcontrol.c
> +++ b/mm/memcontrol.c
> @@ -3464,7 +3464,7 @@ static int mem_cgroup_unregister_event(struct cgroup *cgrp, struct cftype *cft,
>  	int type = MEMFILE_TYPE(cft->private);
>  	u64 usage;
>  	int size = 0;
> -	int i, j, ret;
> +	int i, j, ret = 0;
>  
>  	mutex_lock(&memcg->thresholds_lock);
>  	if (type == _MEM)

afacit the return value of cftype.unregister_event() is always ignored
anyway.  Perhaps it should be changed to void-returning, or fixed.


--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@xxxxxxxxxx  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]