Skip to content

Commit

Permalink
clk: rockchip: don't return NULL when failing to register ddrclk branch
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Shawn Lin authored and Heiko Stuebner committed Oct 16, 2016
1 parent 1001354 commit 4a262b1
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions drivers/clk/rockchip/clk-ddr.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

0 comments on commit 4a262b1

Please sign in to comment.