lkml.org 
[lkml]   [2015]   [Jan]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Subject[PATCH] cgroup: Initialize root in cgroup_mount
From
Date
Compiling kernel/ causes warnings:

... ‘root’ may be used uninitialized in this function
... ‘root’ was declared here

This isn't an issue since there is already logic to not use
root if we goto out_unlock without setting root.

Explicitly initialize root to NULL to suppress this so that we can
focus on catching warnings that can potentially cause bigger issues.

Signed-off-by: Jason Low <jason.low2@hp.com>
---
kernel/cgroup.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/kernel/cgroup.c b/kernel/cgroup.c
index bb263d0..66684f3 100644
--- a/kernel/cgroup.c
+++ b/kernel/cgroup.c
@@ -1738,8 +1738,8 @@ static struct dentry *cgroup_mount(struct file_system_type *fs_type,
void *data)
{
struct super_block *pinned_sb = NULL;
+ struct cgroup_root *root = NULL;
struct cgroup_subsys *ss;
- struct cgroup_root *root;
struct cgroup_sb_opts opts;
struct dentry *dentry;
int ret;
--
1.7.1




\
 
 \ /
  Last update: 2015-01-27 01:41    [W:0.104 / U:0.040 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site