mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-08 20:07:46 +09:00
UPSTREAM: 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.
Change-Id: Id09f496979ab839d04b5ec4cf5c623fde9215440
Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com>
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
(cherry picked from commit 4a262b14c5)
This commit is contained in:
@@ -366,11 +366,8 @@ 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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user