Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Shawn Lin and committed by
Heiko Stuebner
4a262b14 1001354c

+1 -4
+1 -4
drivers/clk/rockchip/clk-ddr.c
··· 144 144 ddrclk->ddr_flag = ddr_flag; 145 145 146 146 clk = clk_register(NULL, &ddrclk->hw); 147 - if (IS_ERR(clk)) { 148 - pr_err("%s: could not register ddrclk %s\n", __func__, name); 147 + if (IS_ERR(clk)) 149 148 kfree(ddrclk); 150 - return NULL; 151 - } 152 149 153 150 return clk; 154 151 }