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 X-Patchwork-Id: 1945521 Return-Path: X-Original-To: patchwork-linux-pm@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork2.kernel.org (Postfix) with ESMTP id AA006DF23A for ; Tue, 8 Jan 2013 13:07:41 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756235Ab3AHNHk (ORCPT ); Tue, 8 Jan 2013 08:07:40 -0500 Received: from mail-da0-f50.google.com ([209.85.210.50]:64446 "EHLO mail-da0-f50.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756224Ab3AHNHk (ORCPT ); Tue, 8 Jan 2013 08:07:40 -0500 Received: by mail-da0-f50.google.com with SMTP id h15so187989dan.23 for ; Tue, 08 Jan 2013 05:07:39 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-received:from:to:cc:subject:date:message-id:x-mailer :x-gm-message-state; bh=YWA2xynPoa97pmBLcKW3/YbEM17q7qvA22fB9rETRJI=; b=hXsBIObXX2rL/HNUcSkhdVY7xEQh7jsFpMYIcSsGCzxi2qMMVODbuImh1YKQtC6rjH RYFdOwQcoheu2mZXDSBsAwfGyT1VuqI6UtdfrbzEuzcKdRXp9PXpg76mz3L6e629GIom LlvC6TE3fMnx1MwRhAKb1Ejh7TDmpjFZ3tl9ALkDuziwyRTL3eGLxxxn428gA03CIcnc S9xPmUPjydp3TaeKbftp7/Tb2mafpDv6gWiRN3isf89yFJeJGvEkdkOS1SdKiRxahxzj IuxcJ2IKUBomAusvnfi4bV75FWa3Ws18gestNBLz1kbdcAGjpKvJFNwZNQRZzcsXY1qs 6m9Q== 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: ALoCoQlBzhRNhCa47EsmlgNb3Tt4vWTB7tjlfBLmabAVfmJ0mMyBtn/JUAY5Uqityk2yD8cH9myQ Sender: linux-pm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org 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)