mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-12-28 11:18:45 +07:00
clk: Bail out when calculating phase fails during clk registration
Bail out of clk registration if we fail to get the phase for a clk that has a clk_ops::get_phase() callback. Print a warning too so that driver authors can easily figure out that some clk is unable to read back phase information at boot. Cc: Douglas Anderson <dianders@chromium.org> Cc: Heiko Stuebner <heiko@sntech.de> Suggested-by: Jerome Brunet <jbrunet@baylibre.com> Signed-off-by: Stephen Boyd <sboyd@kernel.org> Link: https://lkml.kernel.org/r/20200205232802.29184-5-sboyd@kernel.org Acked-by: Jerome Brunet <jbrunet@baylibre.com>
This commit is contained in:
parent
0daa376d83
commit
2760878662
@ -3457,7 +3457,12 @@ static int __clk_core_init(struct clk_core *core)
|
||||
* Since a phase is by definition relative to its parent, just
|
||||
* query the current clock phase, or just assume it's in phase.
|
||||
*/
|
||||
clk_core_get_phase(core);
|
||||
ret = clk_core_get_phase(core);
|
||||
if (ret < 0) {
|
||||
pr_warn("%s: Failed to get phase for clk '%s'\n", __func__,
|
||||
core->name);
|
||||
goto out;
|
||||
}
|
||||
|
||||
/*
|
||||
* Set clk's duty cycle.
|
||||
|
Loading…
Reference in New Issue
Block a user