linux-rockchip.lists.infradead.org archive mirror
 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
       [not found] ` <1476275501-2653-1-git-send-email-shawn.lin-TNX95d0MmH7DzftRWevZcw@public.gmane.org>
  0 siblings, 1 reply; 2+ messages in thread
From: Shawn Lin @ 2016-10-12 12:31 UTC (permalink / raw)
  To: Heiko Stuebner
  Cc: Lin Huang, Michael Turquette, Stephen Boyd,
	linux-rockchip-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r, Shawn Lin,
	linux-clk-u79uwXL29TY76Z2rM5mHXA

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-TNX95d0MmH7DzftRWevZcw@public.gmane.org>
---

 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
       [not found] ` <1476275501-2653-1-git-send-email-shawn.lin-TNX95d0MmH7DzftRWevZcw@public.gmane.org>
@ 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: linux-rockchip-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	Michael Turquette, Stephen Boyd, linux-clk-u79uwXL29TY76Z2rM5mHXA,
	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-TNX95d0MmH7DzftRWevZcw@public.gmane.org>

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
     [not found] ` <1476275501-2653-1-git-send-email-shawn.lin-TNX95d0MmH7DzftRWevZcw@public.gmane.org>
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;
as well as URLs for NNTP newsgroup(s).