of: overlay: pr_err from return NOTIFY_OK to overlay apply/remove
authorFrank Rowand <frank.rowand@sony.com>
Thu, 19 Oct 2017 21:18:27 +0000 (14:18 -0700)
committerRob Herring <robh@kernel.org>
Thu, 19 Oct 2017 22:15:09 +0000 (17:15 -0500)
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@kernel.org
Signed-off-by: Frank Rowand <frank.rowand@sony.com>
Signed-off-by: Rob Herring <robh@kernel.org>
drivers/of/overlay.c

index c99842b..f5fce0f 100644 (file)
@@ -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);