Devicetree
 help / color / mirror / Atom feed
From: Frank Rowand <frowand.list-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
To: Moritz Fischer
	<moritz.fischer-+aYTwkv1SeIAvxtiuMwx3w@public.gmane.org>,
	devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Cc: linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	robh+dt-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org,
	pantelis.antoniou-OWPKS81ov/FWk0Htik3J/w@public.gmane.org,
	Moritz Fischer <mdf-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
Subject: Re: [PATCH v4] of: Fix issue where code would fall through to error case.
Date: Thu, 1 Dec 2016 23:11:31 -0800	[thread overview]
Message-ID: <58411EA3.8040000@gmail.com> (raw)
In-Reply-To: <1480659025-18836-1-git-send-email-moritz.fischer-+aYTwkv1SeIAvxtiuMwx3w@public.gmane.org>

On 12/01/16 22:10, Moritz Fischer wrote:
> From: Moritz Fischer <mdf-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
> 
> No longer fall through into the error case that prints out
> an error if no error (err = 0) occurred.
> 
> Fixes d9181b20a83(of: Add back an error message, restructured)
> Signed-off-by: Moritz Fischer <mdf-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
> Reviewed-by: Frank Rowand <frank.rowand-mEdOJwZ7QcZBDgjK7y7TUQ@public.gmane.org>
> ---
> Hi Frank, Rob
> 
> sorry for the noise before.

I'm sure I created much more noise than you did.  Thanks for
persisting.

I am confirming that this still applies for v4:

   Reviewed-by: Frank Rowand <frank.rowand-mEdOJwZ7QcZBDgjK7y7TUQ@public.gmane.org>

-Frank

> 
> Thanks,
> Moritz
> ---
>  drivers/of/resolver.c | 16 ++++++++--------
>  1 file changed, 8 insertions(+), 8 deletions(-)
> 
> diff --git a/drivers/of/resolver.c b/drivers/of/resolver.c
> index 783bd09..8bf12e9 100644
> --- a/drivers/of/resolver.c
> +++ b/drivers/of/resolver.c
> @@ -298,12 +298,12 @@ int of_resolve_phandles(struct device_node *overlay)
>  	if (!overlay) {
>  		pr_err("null overlay\n");
>  		err = -EINVAL;
> -		goto err_out;
> +		goto out;
>  	}
>  	if (!of_node_check_flag(overlay, OF_DETACHED)) {
>  		pr_err("overlay not detached\n");
>  		err = -EINVAL;
> -		goto err_out;
> +		goto out;
>  	}
>  
>  	phandle_delta = live_tree_max_phandle() + 1;
> @@ -315,7 +315,7 @@ int of_resolve_phandles(struct device_node *overlay)
>  
>  	err = adjust_local_phandle_references(local_fixups, overlay, phandle_delta);
>  	if (err)
> -		goto err_out;
> +		goto out;
>  
>  	overlay_fixups = NULL;
>  
> @@ -333,7 +333,7 @@ int of_resolve_phandles(struct device_node *overlay)
>  	if (!tree_symbols) {
>  		pr_err("no symbols in root of device tree.\n");
>  		err = -EINVAL;
> -		goto err_out;
> +		goto out;
>  	}
>  
>  	for_each_property_of_node(overlay_fixups, prop) {
> @@ -345,12 +345,12 @@ int of_resolve_phandles(struct device_node *overlay)
>  		err = of_property_read_string(tree_symbols,
>  				prop->name, &refpath);
>  		if (err)
> -			goto err_out;
> +			goto out;
>  
>  		refnode = of_find_node_by_path(refpath);
>  		if (!refnode) {
>  			err = -ENOENT;
> -			goto err_out;
> +			goto out;
>  		}
>  
>  		phandle = refnode->phandle;
> @@ -361,9 +361,9 @@ int of_resolve_phandles(struct device_node *overlay)
>  			break;
>  	}
>  
> -err_out:
> -	pr_err("overlay phandle fixup failed: %d\n", err);
>  out:
> +	if (err)
> +		pr_err("overlay phandle fixup failed: %d\n", err);
>  	of_node_put(tree_symbols);
>  
>  	return err;
> 

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

  parent reply	other threads:[~2016-12-02  7:11 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-12-02  6:10 [PATCH v4] of: Fix issue where code would fall through to error case Moritz Fischer
     [not found] ` <1480659025-18836-1-git-send-email-moritz.fischer-+aYTwkv1SeIAvxtiuMwx3w@public.gmane.org>
2016-12-02  7:11   ` Frank Rowand [this message]
2016-12-09 16:33 ` Rob Herring

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=58411EA3.8040000@gmail.com \
    --to=frowand.list-re5jqeeqqe8avxtiumwx3w@public.gmane.org \
    --cc=devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=mdf-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org \
    --cc=moritz.fischer-+aYTwkv1SeIAvxtiuMwx3w@public.gmane.org \
    --cc=pantelis.antoniou-OWPKS81ov/FWk0Htik3J/w@public.gmane.org \
    --cc=robh+dt-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox