From patchwork Mon Jul 25 13:34:21 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Morten Rasmussen X-Patchwork-Id: 72718 Delivered-To: patch@linaro.org Received: by 10.140.29.52 with SMTP id a49csp1150793qga; Mon, 25 Jul 2016 06:35:32 -0700 (PDT) X-Received: by 10.66.161.195 with SMTP id xu3mr29526957pab.68.1469453732122; Mon, 25 Jul 2016 06:35:32 -0700 (PDT) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id w8si13171613paj.25.2016.07.25.06.35.31; Mon, 25 Jul 2016 06:35:32 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752840AbcGYNfO (ORCPT + 29 others); Mon, 25 Jul 2016 09:35:14 -0400 Received: from foss.arm.com ([217.140.101.70]:33706 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752555AbcGYNfG (ORCPT ); Mon, 25 Jul 2016 09:35:06 -0400 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.72.51.249]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id E0BB8B9A; Mon, 25 Jul 2016 06:36:19 -0700 (PDT) Received: from e105550-lin.cambridge.arm.com (e105550-lin.cambridge.arm.com [10.1.211.30]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id 78B683F21A; Mon, 25 Jul 2016 06:35:03 -0700 (PDT) From: Morten Rasmussen To: peterz@infradead.org, mingo@redhat.com Cc: dietmar.eggemann@arm.com, yuyang.du@intel.com, vincent.guittot@linaro.org, mgalbraith@suse.de, sgurrappadi@nvidia.com, freedom.tan@mediatek.com, keita.kobayashi.ym@renesas.com, linux-kernel@vger.kernel.org, Morten Rasmussen Subject: [PATCH v3 04/13] sched/core: Remove unnecessary null-pointer check Date: Mon, 25 Jul 2016 14:34:21 +0100 Message-Id: <1469453670-2660-5-git-send-email-morten.rasmussen@arm.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1469453670-2660-1-git-send-email-morten.rasmussen@arm.com> References: <1469453670-2660-1-git-send-email-morten.rasmussen@arm.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 cc: Peter Zijlstra Signed-off-by: Morten Rasmussen --- kernel/sched/core.c | 2 -- 1 file changed, 2 deletions(-) -- 1.9.1 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) {