lkml.org 
[lkml]   [2015]   [Dec]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] cgroup: Fix uninitialized variable warning
On Wed, Dec 23, 2015 at 02:53:27PM -0700, Ross Zwisler wrote:
> Commit 1f7dd3e5a6e4 ("cgroup: fix handling of multi-destination migration
> from subtree_control enabling") introduced the following compiler warning:
>
> mm/memcontrol.c: In function ‘mem_cgroup_can_attach’:
> mm/memcontrol.c:4790:9: warning: ‘memcg’ may be used uninitialized in this function [-Wmaybe-uninitialized]
> mc.to = memcg;
> ^
>
> Fix this by initializing 'memcg' to NULL.
>
> This was found using gcc (GCC) 4.9.2 20150212 (Red Hat 4.9.2-6).
>
> Signed-off-by: Ross Zwisler <ross.zwisler@linux.intel.com>

Applied to cgroup/for-4.5.

Thanks.

--
tejun


\
 
 \ /
  Last update: 2015-12-28 17:21    [W:0.156 / U:0.012 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site