public inbox for linux-clk@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] clk: rockchip: don't return NULL when failing to register ddrclk branch
@ 2016-10-12 12:31 Shawn Lin
  2016-10-14 17:06 ` Heiko Stuebner
  0 siblings, 1 reply; 2+ messages in thread
From: Shawn Lin @ 2016-10-12 12:31 UTC (permalink / raw)
  To: Heiko Stuebner
  Cc: Stephen Boyd, Michael Turquette, linux-clk, linux-rockchip,
	Lin Huang, Shawn Lin

rockchip_clk_register_ddrclk should not return NULL when faling
to call clk_register, otherwise rockchip_clk_register_branches
prints "unknown clock type". The acutal case is that it's a known
clock type but we fail to regiser it, which may makes user confuse
the reason of failure. And the pr_err here is pointless as
rockchip_clk_register_branches will also print the similar message.

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

 drivers/clk/rockchip/clk-ddr.c | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/drivers/clk/rockchip/clk-ddr.c b/drivers/clk/rockchip/clk-ddr.c
index 8feba93..e807535 100644
--- a/drivers/clk/rockchip/clk-ddr.c
+++ b/drivers/clk/rockchip/clk-ddr.c
@@ -144,11 +144,8 @@ struct clk *rockchip_clk_register_ddrclk(const char *name, int flags,
 	ddrclk->ddr_flag = ddr_flag;
 
 	clk = clk_register(NULL, &ddrclk->hw);
-	if (IS_ERR(clk)) {
-		pr_err("%s: could not register ddrclk %s\n", __func__,	name);
+	if (IS_ERR(clk))
 		kfree(ddrclk);
-		return NULL;
-	}
 
 	return clk;
 }
-- 
2.3.7

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] clk: rockchip: don't return NULL when failing to register ddrclk branch
  2016-10-12 12:31 [PATCH] clk: rockchip: don't return NULL when failing to register ddrclk branch Shawn Lin
@ 2016-10-14 17:06 ` Heiko Stuebner
  0 siblings, 0 replies; 2+ messages in thread
From: Heiko Stuebner @ 2016-10-14 17:06 UTC (permalink / raw)
  To: Shawn Lin
  Cc: Stephen Boyd, Michael Turquette, linux-clk, linux-rockchip,
	Lin Huang

Am Mittwoch, 12. Oktober 2016, 20:31:41 CEST schrieb Shawn Lin:
> rockchip_clk_register_ddrclk should not return NULL when faling
> to call clk_register, otherwise rockchip_clk_register_branches
> prints "unknown clock type". The acutal case is that it's a known
> clock type but we fail to regiser it, which may makes user confuse
> the reason of failure. And the pr_err here is pointless as
> rockchip_clk_register_branches will also print the similar message.
> 
> Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com>

thanks for catching this ... applied to a clk-fixes branch for 4.9

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2016-10-14 17:06 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-10-12 12:31 [PATCH] clk: rockchip: don't return NULL when failing to register ddrclk branch Shawn Lin
2016-10-14 17:06 ` Heiko Stuebner

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox