]> git.baikalelectronics.ru Git - kernel.git/commit
clk: Don't cache errors from clk_ops::get_phase()
authorStephen Boyd <sboyd@kernel.org>
Wed, 5 Feb 2020 23:27:59 +0000 (15:27 -0800)
committerStephen Boyd <sboyd@kernel.org>
Wed, 12 Feb 2020 23:26:42 +0000 (15:26 -0800)
commit50fc6e05abe0300c224ae8cc093dabf4cd406075
tree57a240645f52b0c7ab530444f6532da52807f3da
parent9f9285b96014e47599924b03ab0c07fa1549e04b
clk: Don't cache errors from clk_ops::get_phase()

We don't check for errors from clk_ops::get_phase() before storing away
the result into the clk_core::phase member. This can lead to some fairly
confusing debugfs information if these ops do return an error. Let's
skip the store when this op fails to fix this. While we're here, move
the locking outside of clk_core_get_phase() to simplify callers from
the debugfs side.

Cc: Douglas Anderson <dianders@chromium.org>
Cc: Heiko Stuebner <heiko@sntech.de>
Cc: Jerome Brunet <jbrunet@baylibre.com>
Signed-off-by: Stephen Boyd <sboyd@kernel.org>
Link: https://lkml.kernel.org/r/20200205232802.29184-2-sboyd@kernel.org
Acked-by: Jerome Brunet <jbrunet@baylibre.com>
drivers/clk/clk.c