]> git.baikalelectronics.ru Git - kernel.git/commit
clk: sunxi: Don't call clk_hw_get_name() on a hw that isn't registered
authorStephen Boyd <sboyd@kernel.org>
Thu, 15 Aug 2019 04:10:37 +0000 (21:10 -0700)
committerStephen Boyd <sboyd@kernel.org>
Fri, 16 Aug 2019 17:27:29 +0000 (10:27 -0700)
commite56e09e75e8d9c4185bedf4c1753ac8cb43d9103
tree4d79e2614df3dfc74691e4226b00365fa69f9d02
parent71992fbc0b9cf6fe02c0d2a13391cd8f7251745b
clk: sunxi: Don't call clk_hw_get_name() on a hw that isn't registered

The implementation of clk_hw_get_name() relies on the clk_core
associated with the clk_hw pointer existing. If of_clk_hw_register()
fails, there isn't a clk_core created yet, so calling clk_hw_get_name()
here fails. Extract the name first so we can print it later.

Fixes: 3241afa3eefd ("clk: sunxi-ng: Add common infrastructure")
Cc: Maxime Ripard <maxime.ripard@bootlin.com>
Cc: Chen-Yu Tsai <wens@csie.org>
Signed-off-by: Stephen Boyd <sboyd@kernel.org>
drivers/clk/sunxi-ng/ccu_common.c