Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

of: overlay: do not break notify on NOTIFY_{OK|STOP}

We should not break overlay notifications on NOTIFY_{OK|STOP}
otherwise we might break on the first fragment. We should only stop
notifications if a *real* errno is returned by one of the listeners.

Fixes: a1d19bd4cf1fe ("of: overlay: pr_err from return NOTIFY_OK to overlay apply/remove")
Signed-off-by: Nuno Sá <nuno.sa@analog.com>
Signed-off-by: Rob Herring <robh@kernel.org>
Link: https://lore.kernel.org/r/20220420130205.89435-1-nuno.sa@analog.com

authored by

Nuno Sá and committed by
Rob Herring
5f756a2e fe7ff911

+1 -3
+1 -3
drivers/of/overlay.c
··· 170 170 171 171 ret = blocking_notifier_call_chain(&overlay_notify_chain, 172 172 action, &nd); 173 - if (ret == NOTIFY_OK || ret == NOTIFY_STOP) 174 - return 0; 175 - if (ret) { 173 + if (notifier_to_errno(ret)) { 176 174 ret = notifier_to_errno(ret); 177 175 pr_err("overlay changeset %s notifier error %d, target: %pOF\n", 178 176 of_overlay_action_name[action], ret, nd.target);