From patchwork Tue Jan 8 13:03:11 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: rajagopal.venkat@linaro.org X-Patchwork-Id: 13918 Return-Path: X-Original-To: patchwork@peony.canonical.com Delivered-To: patchwork@peony.canonical.com Received: from fiordland.canonical.com (fiordland.canonical.com [91.189.94.145]) by peony.canonical.com (Postfix) with ESMTP id F0A3E23E27 for ; Tue, 8 Jan 2013 13:07:42 +0000 (UTC) Received: from mail-vc0-f170.google.com (mail-vc0-f170.google.com [209.85.220.170]) by fiordland.canonical.com (Postfix) with ESMTP id 80F30A19979 for ; Tue, 8 Jan 2013 13:07:42 +0000 (UTC) Received: by mail-vc0-f170.google.com with SMTP id fl11so340681vcb.1 for ; Tue, 08 Jan 2013 05:07:42 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-received:x-forwarded-to:x-forwarded-for:delivered-to:x-received :received-spf:x-received:from:to:cc:subject:date:message-id:x-mailer :x-gm-message-state; bh=YWA2xynPoa97pmBLcKW3/YbEM17q7qvA22fB9rETRJI=; b=U3ZwpllFrKSQlVBnQ65K1tXSCHmWfOfFeFYydB+yi2k6Wq0qJJPwj9WhKjlnyPNizL uSOGGSaZMdl7yK1/9MydGSJJsiXJq/LZ8bSVoUfPHw35+T1WzTc8/ZzNrvHFC+joVwD2 +okRo7AuPCv+vejBBdv+JdAwKoOrvo6q745eY29FsaI4liu1ejRdOsPBEJcNJCm2XfnC S+C/tPthk1FtUxBTRm7OwoCyDkZUU+syMzJOayaJr2u1vFPBcx/PpBnc8ZgIkKDwz5mt 1PALNult0hMrJZ1xmU6RhFXvr8VTQ9/aBp/4rQ+DZGVQajv5USWDSzkx0j0KptLzhpzB 1aBA== X-Received: by 10.220.218.197 with SMTP id hr5mr84530112vcb.8.1357650462004; Tue, 08 Jan 2013 05:07:42 -0800 (PST) X-Forwarded-To: linaro-patchwork@canonical.com X-Forwarded-For: patch@linaro.org linaro-patchwork@canonical.com Delivered-To: patches@linaro.org Received: by 10.58.145.101 with SMTP id st5csp109082veb; Tue, 8 Jan 2013 05:07:41 -0800 (PST) X-Received: by 10.50.160.137 with SMTP id xk9mr8377194igb.77.1357650460533; Tue, 08 Jan 2013 05:07:40 -0800 (PST) Received: from mail-da0-f53.google.com (mail-da0-f53.google.com [209.85.210.53]) by mx.google.com with ESMTPS id u7si62894576paw.127.2013.01.08.05.07.39 (version=TLSv1/SSLv3 cipher=OTHER); Tue, 08 Jan 2013 05:07:40 -0800 (PST) Received-SPF: neutral (google.com: 209.85.210.53 is neither permitted nor denied by best guess record for domain of rajagopal.venkat@linaro.org) client-ip=209.85.210.53; Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.210.53 is neither permitted nor denied by best guess record for domain of rajagopal.venkat@linaro.org) smtp.mail=rajagopal.venkat@linaro.org Received: by mail-da0-f53.google.com with SMTP id x6so187838dac.40 for ; Tue, 08 Jan 2013 05:07:39 -0800 (PST) X-Received: by 10.68.132.232 with SMTP id ox8mr198411145pbb.46.1357650459817; Tue, 08 Jan 2013 05:07:39 -0800 (PST) Received: from localhost.localdomain ([101.63.135.210]) by mx.google.com with ESMTPS id pj1sm39610125pbb.71.2013.01.08.05.07.35 (version=TLSv1/SSLv3 cipher=OTHER); Tue, 08 Jan 2013 05:07:39 -0800 (PST) From: Rajagopal Venkat To: mturquette@linaro.org Cc: patches@linaro.org, linaro-dev@lists.linaro.org, linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org, Rajagopal Venkat Subject: [PATCH] clk: remove unreachable code Date: Tue, 8 Jan 2013 18:33:11 +0530 Message-Id: <1357650191-30842-1-git-send-email-rajagopal.venkat@linaro.org> X-Mailer: git-send-email 1.7.10.4 X-Gm-Message-State: ALoCoQkhKRHk4awOgDiQj3V/Zq8yEld7kw99GMSWLqgfVMiGl5yMsxetlKQ7UJuGZaelexff16vS while reparenting a clock, NULL check is done for clock in consideration and its new parent. So re-check is not required. If done, else part becomes unreachable. Signed-off-by: Rajagopal Venkat --- drivers/clk/clk.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/drivers/clk/clk.c b/drivers/clk/clk.c index 251e45d..f896584 100644 --- a/drivers/clk/clk.c +++ b/drivers/clk/clk.c @@ -1048,10 +1048,7 @@ void __clk_reparent(struct clk *clk, struct clk *new_parent) hlist_del(&clk->child_node); - if (new_parent) - hlist_add_head(&clk->child_node, &new_parent->children); - else - hlist_add_head(&clk->child_node, &clk_orphan_list); + hlist_add_head(&clk->child_node, &new_parent->children); #ifdef CONFIG_COMMON_CLK_DEBUG if (!inited)