diff mbox series

of: overlay: pr_err from return NOTIFY_OK to overlay apply/remove

Message ID 1508447907-4462-1-git-send-email-frowand.list@gmail.com
State Accepted, archived
Headers show
Series of: overlay: pr_err from return NOTIFY_OK to overlay apply/remove | expand

Commit Message

Frank Rowand Oct. 19, 2017, 9:18 p.m. UTC
From: Frank Rowand <frank.rowand@sony.com>

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>
---
 drivers/of/overlay.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Frank Rowand Oct. 19, 2017, 9:49 p.m. UTC | #1
On 10/19/17 14:18, frowand.list@gmail.com wrote:
> From: Frank Rowand <frank.rowand@sony.com>
> 
> 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>
> ---
>  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);
> 

Not needed in any stable kernel.  This is caused by
"[PATCH v3 00/12] of: overlay: clean up device tree overlay code".

-Frank
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Rob Herring Oct. 19, 2017, 10:13 p.m. UTC | #2
On Thu, Oct 19, 2017 at 4:18 PM,  <frowand.list@gmail.com> wrote:
> From: Frank Rowand <frank.rowand@sony.com>
>
> 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>
> ---
>  drivers/of/overlay.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

Applied.

Rob
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox series

Patch

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);