summaryrefslogtreecommitdiffstats
path: root/drivers/clk/clk.c
diff options
context:
space:
mode:
authorPeter De Schrijver2017-03-21 11:16:26 +0100
committerMichael Turquette2017-04-12 18:51:41 +0200
commit17c34c566795ca7529cf888fb33fdb7997d6b202 (patch)
tree35998c887c1f7f508b2e5d36d737bba1244c380e /drivers/clk/clk.c
parentclk: add clk_possible_parents debugfs file (diff)
downloadkernel-qcow2-linux-17c34c566795ca7529cf888fb33fdb7997d6b202.tar.gz
kernel-qcow2-linux-17c34c566795ca7529cf888fb33fdb7997d6b202.tar.xz
kernel-qcow2-linux-17c34c566795ca7529cf888fb33fdb7997d6b202.zip
clk: aggregate return codes of notify chains
In case there are multiple notify chains for the same clocks (because they were registered by different users), we need to propagate potential failure of any single one of them to the caller. Otherwise we eg risk violating the V/f curve when a notifier is used for DVFS. Signed-off-by: Peter De Schrijver <pdeschrijver@nvidia.com> Signed-off-by: Stephen Boyd <sboyd@codeaurora.org> Signed-off-by: Michael Turquette <mturquette@baylibre.com>
Diffstat (limited to 'drivers/clk/clk.c')
-rw-r--r--drivers/clk/clk.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/clk/clk.c b/drivers/clk/clk.c
index 0d8eb5aa477a..cddddbe46d9d 100644
--- a/drivers/clk/clk.c
+++ b/drivers/clk/clk.c
@@ -966,6 +966,8 @@ static int __clk_notify(struct clk_core *core, unsigned long msg,
cnd.clk = cn->clk;
ret = srcu_notifier_call_chain(&cn->notifier_head, msg,
&cnd);
+ if (ret & NOTIFY_STOP_MASK)
+ return ret;
}
}