Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753229AbbEAAPS (ORCPT ); Thu, 30 Apr 2015 20:15:18 -0400 Received: from smtp.codeaurora.org ([198.145.29.96]:51484 "EHLO smtp.codeaurora.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751211AbbEAAO0 (ORCPT ); Thu, 30 Apr 2015 20:14:26 -0400 From: Stephen Boyd To: Mike Turquette , Stephen Boyd Cc: linux-kernel@vger.kernel.org, linux-clk@vger.kernel.org Subject: [PATCH 4/6] clk: Remove impossible if condition in clk_core_get_phase() Date: Thu, 30 Apr 2015 17:14:19 -0700 Message-Id: <1430439261-10291-5-git-send-email-sboyd@codeaurora.org> X-Mailer: git-send-email 2.3.0.rc1.33.g42e4583 In-Reply-To: <1430439261-10291-1-git-send-email-sboyd@codeaurora.org> References: <1430439261-10291-1-git-send-email-sboyd@codeaurora.org> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1054 Lines: 39 This condition can't ever be true because this function is static and it's always called with a non-NULL pointer. Signed-off-by: Stephen Boyd --- drivers/clk/clk.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/drivers/clk/clk.c b/drivers/clk/clk.c index 8d36100c00ce..3e58b7453076 100644 --- a/drivers/clk/clk.c +++ b/drivers/clk/clk.c @@ -2182,16 +2182,12 @@ EXPORT_SYMBOL_GPL(clk_set_phase); static int clk_core_get_phase(struct clk_core *core) { - int ret = 0; - - if (!core) - goto out; + int ret; clk_prepare_lock(); ret = core->phase; clk_prepare_unlock(); -out: return ret; } EXPORT_SYMBOL_GPL(clk_get_phase); -- The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum, a Linux Foundation Collaborative Project -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/