Эх сурвалжийг харах

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>
Peter De Schrijver 8 жил өмнө
parent
commit
17c34c5667
1 өөрчлөгдсөн 2 нэмэгдсэн , 0 устгасан
  1. 2 0
      drivers/clk/clk.c

+ 2 - 0
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;
 		}
 	}