From 2a5b04bf9b0fe736cc5a8acac10c62b4b4d4d22c Mon Sep 17 00:00:00 2001 From: Syed Rameez Mustafa Date: Tue, 11 Oct 2016 18:24:43 -0700 Subject: [PATCH] sched/tune: Remove redundant checks for NULL css The check for NULL css is redundant as upper layers are already making sure that css cannot be NULL. Remove this check. It helps to silence static analysis errors as well. Change-Id: I64585ff8cceb307904e20ff788e52eb05c000e1f Signed-off-by: Syed Rameez Mustafa --- kernel/sched/tune.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kernel/sched/tune.c b/kernel/sched/tune.c index 3c964d6d3856..4f8182302e5e 100644 --- a/kernel/sched/tune.c +++ b/kernel/sched/tune.c @@ -29,7 +29,7 @@ struct schedtune { static inline struct schedtune *css_st(struct cgroup_subsys_state *css) { - return css ? container_of(css, struct schedtune, css) : NULL; + return container_of(css, struct schedtune, css); } static inline struct schedtune *task_schedtune(struct task_struct *tsk)