All of lore.kernel.org
 help / color / mirror / Atom feed
From: Stephen Boyd <sboyd@codeaurora.org>
To: Mike Turquette <mturquette@linaro.org>,
	Stephen Boyd <sboyd@codeaurora.org>
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	[thread overview]
Message-ID: <1430439261-10291-5-git-send-email-sboyd@codeaurora.org> (raw)
In-Reply-To: <1430439261-10291-1-git-send-email-sboyd@codeaurora.org>

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 <sboyd@codeaurora.org>
---
 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

  parent reply	other threads:[~2015-05-01  0:14 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-05-01  0:14 [PATCH 0/6] clk.c cleanups Stephen Boyd
2015-05-01  0:14 ` [PATCH 1/6] clk: s/clk/core/ for struct clk_core Stephen Boyd
2015-05-01  0:14 ` [PATCH 2/6] clk: Squash __clk_{enable,disable}() into callers Stephen Boyd
2015-05-01  0:14 ` [PATCH 3/6] clk: Drop unnecessary OOM prints Stephen Boyd
2015-05-01  0:14 ` Stephen Boyd [this message]
2015-05-01  0:14 ` [PATCH 5/6] clk: Remove forward declared function prototypes Stephen Boyd
2015-05-01  0:14 ` [PATCH 6/6] clk: Update some comments to reflect reality Stephen Boyd
2015-05-13  3:12 ` [PATCH 0/6] clk.c cleanups Michael Turquette
2015-05-13  3:12   ` Michael Turquette

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1430439261-10291-5-git-send-email-sboyd@codeaurora.org \
    --to=sboyd@codeaurora.org \
    --cc=linux-clk@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mturquette@linaro.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.