summaryrefslogtreecommitdiffstats
path: root/drivers/clk/rockchip
diff options
context:
space:
mode:
authorShawn Lin <shawn.lin@rock-chips.com>2016-10-12 20:31:41 +0800
committerHeiko Stuebner <heiko@sntech.de>2016-10-16 02:39:58 +0200
commit4a262b14c57d6ec88982d40273e742f7b9151560 (patch)
tree52a611fe7432d3c5c0133162ea28759c538954dc /drivers/clk/rockchip
parent1001354ca34179f3db924eb66672442a173147dc (diff)
downloadblackbird-op-linux-4a262b14c57d6ec88982d40273e742f7b9151560.tar.gz
blackbird-op-linux-4a262b14c57d6ec88982d40273e742f7b9151560.zip
clk: rockchip: don't return NULL when failing to register ddrclk branch
rockchip_clk_register_ddrclk should not return NULL when failing to call clk_register, otherwise rockchip_clk_register_branches prints "unknown clock type". The actual case is that it's a known clock type but we fail to register 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> Signed-off-by: Heiko Stuebner <heiko@sntech.de>
Diffstat (limited to 'drivers/clk/rockchip')
-rw-r--r--drivers/clk/rockchip/clk-ddr.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/drivers/clk/rockchip/clk-ddr.c b/drivers/clk/rockchip/clk-ddr.c
index 8feba93672c5..e8075359366b 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;
}
OpenPOWER on IntegriCloud