From 7896dfb0a6180beb51bf34b32c9427984cb052c4 Mon Sep 17 00:00:00 2001 From: Parav Pandit Date: Tue, 10 Jan 2017 17:51:48 +0000 Subject: [PATCH] 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 Signed-off-by: Tejun Heo --- kernel/cgroup/rdma.c | 2 ++ 1 file changed, 2 insertions(+) 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) -- 2.20.1