mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Shawn Lin <shawn.lin@rock-chips.com>
To: Heiko Stuebner <heiko@sntech.de>, Xing Zheng <zhengxing@rock-chips.com>
Cc: Michael Turquette <mturquette@baylibre.com>,
	Stephen Boyd <sboyd@codeaurora.org>,
	linux-clk@vger.kernel.org, linux-rockchip@lists.infradead.org,
	linux-kernel@vger.kernel.org,
	Shawn Lin <shawn.lin@rock-chips.com>
Subject: [PATCH 6/7] clk: rockchip: remove redundant checking of device_node
Date: Sun, 13 Mar 2016 00:25:53 +0800	[thread overview]
Message-ID: <1457799953-3267-1-git-send-email-shawn.lin@rock-chips.com> (raw)
In-Reply-To: <1457799871-3015-1-git-send-email-shawn.lin@rock-chips.com>

rockchip_clk_of_add_provider is used by sub-clk driver which
already call of_iomap before calling it. If device_node does
not exist, of_iomap returns NULL which will fail to init the
sub-clk driver. So really it's redundant.

Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com>
---

 drivers/clk/rockchip/clk.c | 8 +++-----
 1 file changed, 3 insertions(+), 5 deletions(-)

diff --git a/drivers/clk/rockchip/clk.c b/drivers/clk/rockchip/clk.c
index c12db69..7345be4 100644
--- a/drivers/clk/rockchip/clk.c
+++ b/drivers/clk/rockchip/clk.c
@@ -357,11 +357,9 @@ err_free:
 void __init rockchip_clk_of_add_provider(struct device_node *np,
 				struct rockchip_clk_provider *ctx)
 {
-	if (np) {
-		if (of_clk_add_provider(np, of_clk_src_onecell_get,
-					&ctx->clk_data))
-			pr_err("%s: could not register clk provider\n", __func__);
-	}
+	if (of_clk_add_provider(np, of_clk_src_onecell_get,
+				&ctx->clk_data))
+		pr_err("%s: could not register clk provider\n", __func__);
 }
 
 struct regmap *rockchip_clk_get_grf(struct rockchip_clk_provider *ctx)
-- 
2.3.7

  parent reply	other threads:[~2016-03-12 16:34 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-03-12 16:24 [PATCH 0/7] Some trivial patches for rockchip clk stuff Shawn Lin
2016-03-12 16:25 ` [PATCH 1/7] clk: rockchip: remove mux_core_reg from rockchip_cpuclk_reg_data Shawn Lin
2016-03-14  0:13   ` Heiko Stuebner
2016-03-12 16:25 ` [PATCH 2/7] clk: rockchip: fix warning reported by kernel-doc Shawn Lin
2016-03-14  0:25   ` Heiko Stuebner
2016-03-12 16:25 ` [PATCH 3/7] clk: rockchip: release io resource when rk3036_clk_init failed Shawn Lin
2016-03-12 16:48   ` Heiko Stübner
2016-03-13  1:49     ` Shawn Lin
2016-03-12 16:25 ` [PATCH 4/7] clk: rockchip: release io resource when rk3188_common_clk_init failed Shawn Lin
2016-03-12 16:25 ` [PATCH 5/7] clk: rockchip: release io resource when rk3368_clk_init failed Shawn Lin
2016-03-12 16:25 ` Shawn Lin [this message]
2016-03-14  0:26   ` [PATCH 6/7] clk: rockchip: remove redundant checking of device_node Heiko Stuebner
2016-03-12 16:26 ` [PATCH 7/7] clk: rockchip: fix a typo for rockchip_rk3399_pll_set_params Shawn Lin
2016-03-12 16:45   ` Heiko Stübner

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=1457799953-3267-1-git-send-email-shawn.lin@rock-chips.com \
    --to=shawn.lin@rock-chips.com \
    --cc=heiko@sntech.de \
    --cc=linux-clk@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-rockchip@lists.infradead.org \
    --cc=mturquette@baylibre.com \
    --cc=sboyd@codeaurora.org \
    --cc=zhengxing@rock-chips.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®