diff mbox

[v3,04/13] sched/core: Remove unnecessary null-pointer check

Message ID 1469453670-2660-5-git-send-email-morten.rasmussen@arm.com
State New
Headers show

Commit Message

Morten Rasmussen July 25, 2016, 1:34 p.m. UTC
Checking if the sched_domain pointer returned by sd_init() is null seems
pointless as sd_init() neither checks if it is valid to begin with nor
set it to null.

cc: Ingo Molnar <mingo@redhat.com>
cc: Peter Zijlstra <peterz@infradead.org>

Signed-off-by: Morten Rasmussen <morten.rasmussen@arm.com>

---
 kernel/sched/core.c | 2 --
 1 file changed, 2 deletions(-)

-- 
1.9.1
diff mbox

Patch

diff --git a/kernel/sched/core.c b/kernel/sched/core.c
index 4e9617a7e7d9..0a40beb46841 100644
--- a/kernel/sched/core.c
+++ b/kernel/sched/core.c
@@ -6824,8 +6824,6 @@  struct sched_domain *build_sched_domain(struct sched_domain_topology_level *tl,
 		struct sched_domain *child, int cpu)
 {
 	struct sched_domain *sd = sd_init(tl, cpu);
-	if (!sd)
-		return child;
 
 	cpumask_and(sched_domain_span(sd), cpu_map, tl->mask(cpu));
 	if (child) {