From: Peter De Schrijver Date: Tue, 21 Mar 2017 10:16:26 +0000 (+0200) Subject: clk: aggregate return codes of notify chains X-Git-Tag: v4.14-rc1~926^2~45 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=17c34c566795ca7529cf888fb33fdb7997d6b202;p=platform%2Fkernel%2Flinux-rpi.git 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 Signed-off-by: Stephen Boyd Signed-off-by: Michael Turquette --- diff --git a/drivers/clk/clk.c b/drivers/clk/clk.c index 0d8eb5a..cddddbe 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; } }