devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] of: overlay: do not break notify on NOTIFY_OK
@ 2022-04-04  7:40 Nuno Sá
  2022-04-04 18:10 ` Frank Rowand
  2022-04-19 13:02 ` Rob Herring
  0 siblings, 2 replies; 8+ messages in thread
From: Nuno Sá @ 2022-04-04  7:40 UTC (permalink / raw)
  To: devicetree; +Cc: Rob Herring, Frank Rowand, Pantelis Antoniou

We should not break overlay notifications on NOTIFY_OK otherwise we might
break on the first fragment. As NOTIFY_OK is not zero, we need to
account for that when looking for errors.

Fixes: a1d19bd4cf1fe ("of: overlay: pr_err from return NOTIFY_OK to overlay apply/remove")
Signed-off-by: Nuno Sá <nuno.sa@analog.com>
---
 drivers/of/overlay.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/of/overlay.c b/drivers/of/overlay.c
index d80160cf34bb..0b2d47598cfb 100644
--- a/drivers/of/overlay.c
+++ b/drivers/of/overlay.c
@@ -170,9 +170,9 @@ static int overlay_notify(struct overlay_changeset *ovcs,
 
 		ret = blocking_notifier_call_chain(&overlay_notify_chain,
 						   action, &nd);
-		if (ret == NOTIFY_OK || ret == NOTIFY_STOP)
+		if (ret == NOTIFY_STOP)
 			return 0;
-		if (ret) {
+		if (ret && ret != NOTIFY_OK) {
 			ret = notifier_to_errno(ret);
 			pr_err("overlay changeset %s notifier error %d, target: %pOF\n",
 			       of_overlay_action_name[action], ret, nd.target);
-- 
2.35.1


^ permalink raw reply related	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2022-04-19 15:50 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-04-04  7:40 [PATCH] of: overlay: do not break notify on NOTIFY_OK Nuno Sá
2022-04-04 18:10 ` Frank Rowand
2022-04-05  7:19   ` Nuno Sá
2022-04-19 14:32     ` Frank Rowand
2022-04-19 14:48       ` Rob Herring
2022-04-19 15:20         ` Frank Rowand
2022-04-19 15:50           ` Sa, Nuno
2022-04-19 13:02 ` Rob Herring

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).