[PATCH] of: overlay: pr_err from return NOTIFY_OK to overlay apply/remove

From: frowand . list
Date: Thu Oct 19 2017 - 17:18:44 EST


From: Frank Rowand <frank.rowand@xxxxxxxx>

A device tree overlay notifier can return NOTIFY_OK, NOTIFY_STOP,
or an embedded errno. overlay_notify() incorrectly reports an
error for NOTIFY_OK.

Reported-by: atull@xxxxxxxxxx
Signed-off-by: Frank Rowand <frank.rowand@xxxxxxxx>
---
drivers/of/overlay.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/of/overlay.c b/drivers/of/overlay.c
index c99842bb4b09..f5fce0fea40b 100644
--- a/drivers/of/overlay.c
+++ b/drivers/of/overlay.c
@@ -133,7 +133,7 @@ static int overlay_notify(struct overlay_changeset *ovcs,

ret = blocking_notifier_call_chain(&overlay_notify_chain,
action, &nd);
- if (ret == NOTIFY_STOP)
+ if (ret == NOTIFY_OK || ret == NOTIFY_STOP)
return 0;
if (ret) {
ret = notifier_to_errno(ret);
--
Frank Rowand <frank.rowand@xxxxxxxx>