summaryrefslogtreecommitdiffstats
path: root/kernel/cgroup
diff options
context:
space:
mode:
authorParav Pandit <pandit.parav@gmail.com>2017-01-10 17:51:48 +0000
committerTejun Heo <tj@kernel.org>2017-01-10 12:52:32 -0500
commit7896dfb0a6180beb51bf34b32c9427984cb052c4 (patch)
tree8e8a49aebc52e71158890029ba64738199a7dd32 /kernel/cgroup
parent9c1e67f941019907034d7e5584c891603cce2d8e (diff)
downloadlinux-7896dfb0a6180beb51bf34b32c9427984cb052c4.tar.bz2
rdmacg: Fixed uninitialized current resource usage
Fixed warning reported by kbuild test robot. When reading current resource usage value, when no resources are allocated, its possible that it can report a uninitialized value for current resource usage. This fix avoids it by initializing it to zero as no resource is allocated. Signed-off-by: Parav Pandit <pandit.parav@gmail.com> Signed-off-by: Tejun Heo <tj@kernel.org>
Diffstat (limited to 'kernel/cgroup')
-rw-r--r--kernel/cgroup/rdma.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/kernel/cgroup/rdma.c b/kernel/cgroup/rdma.c
index 021bee7a9692..defad3c5e7dc 100644
--- a/kernel/cgroup/rdma.c
+++ b/kernel/cgroup/rdma.c
@@ -518,6 +518,8 @@ static void print_rpool_values(struct seq_file *sf,
} else {
if (rpool)
value = rpool->resources[i].usage;
+ else
+ value = 0;
}
if (value == S32_MAX)