All of lore.kernel.org
 help / color / mirror / Atom feed
From: walter harms <wharms@bfs.de>
To: kernel-janitors@vger.kernel.org
Subject: Re: [PATCH 2/2] soc/fsl/qe: Slighly simplify code
Date: Sun, 20 Aug 2017 19:11:30 +0000	[thread overview]
Message-ID: <5999DEE2.6030405@bfs.de> (raw)
In-Reply-To: <20170820155328.882-1-christophe.jaillet@wanadoo.fr>



Am 20.08.2017 17:53, schrieb Christophe JAILLET:
> Return 0 instead of 'ret' (which is 0 at this point) to make the code more
> explicit.
> Also avoid a useless initialization of 'ret'.
> 
> Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
> ---
>  drivers/soc/fsl/qe/qe_tdm.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/soc/fsl/qe/qe_tdm.c b/drivers/soc/fsl/qe/qe_tdm.c
> index 6b9647fee512..c90c72ca9e3e 100644
> --- a/drivers/soc/fsl/qe/qe_tdm.c
> +++ b/drivers/soc/fsl/qe/qe_tdm.c
> @@ -42,7 +42,7 @@ int ucc_of_parse_tdm(struct device_node *np, struct ucc_tdm *utdm,
>  		     struct ucc_tdm_info *ut_info)
>  {
>  	const char *sprop;
> -	int ret = 0;
> +	int ret;
>  	u32 val;
>  	struct resource *res;
>  	struct device_node *np2;
> @@ -171,7 +171,7 @@ int ucc_of_parse_tdm(struct device_node *np, struct ucc_tdm *utdm,
>  		siram_init_flag = 1;
>  	}
>  
> -	return ret;
> +	return 0;
>  
>  err_miss_siram_property:
>  	return ret;

This lonely return ret looks like a left over from some cleanup opperation.
Is there any reason why to use goto instead of a plain return ?

re,
 wh



  reply	other threads:[~2017-08-20 19:11 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-08-20 15:53 [PATCH 2/2] soc/fsl/qe: Slighly simplify code Christophe JAILLET
2017-08-20 15:53 ` Christophe JAILLET
2017-08-20 15:53 ` Christophe JAILLET
2017-08-20 19:11 ` walter harms [this message]
2017-08-20 21:23 ` Marion & Christophe JAILLET

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=5999DEE2.6030405@bfs.de \
    --to=wharms@bfs.de \
    --cc=kernel-janitors@vger.kernel.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.