The Linux Kernel Mailing List
 help / color / mirror / Atom feed
From: Dan Carpenter <dan.carpenter@oracle.com>
To: Charles Keepax <ckeepax@opensource.cirrus.com>
Cc: broonie@kernel.org, linux-kernel@vger.kernel.org,
	patches@opensource.cirrus.com
Subject: Re: [PATCH] regmap: debugfs: Add back in erroneously removed initialisation of ret
Date: Fri, 18 Sep 2020 15:38:43 +0300	[thread overview]
Message-ID: <20200918123843.GS18329@kadam> (raw)
In-Reply-To: <20200918112002.15216-1-ckeepax@opensource.cirrus.com>

On Fri, Sep 18, 2020 at 12:20:02PM +0100, Charles Keepax wrote:
> Fixes: 94cc89eb8fa5 ("regmap: debugfs: Fix handling of name string for debugfs init delays")
> Reported-by: kernel test robot <lkp@intel.com>
> Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
> Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com>
> ---
>  drivers/base/regmap/regmap.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/base/regmap/regmap.c b/drivers/base/regmap/regmap.c
> index d0f7cc574ff34..b24f14ea96d8a 100644
> --- a/drivers/base/regmap/regmap.c
> +++ b/drivers/base/regmap/regmap.c
> @@ -706,9 +706,9 @@ struct regmap *__regmap_init(struct device *dev,
>  			     const char *lock_name)
>  {
>  	struct regmap *map;
> +	int ret = -EINVAL;
>  	enum regmap_endian reg_endian, val_endian;
>  	int i, j;
> -	int ret;
>  
>  	if (!config)
>  		goto err;

Hi Charles, this isn't enough.  There are several goto err_map; paths
were "ret" is zero.  That will result in an Oops in the caller.  It has
to be an error code.

regards,
dan carpenter


  parent reply	other threads:[~2020-09-18 12:38 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-09-18 11:20 [PATCH] regmap: debugfs: Add back in erroneously removed initialisation of ret Charles Keepax
2020-09-18 12:09 ` Mark Brown
2020-09-18 12:38 ` Dan Carpenter [this message]
2020-09-18 14:43   ` Charles Keepax

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=20200918123843.GS18329@kadam \
    --to=dan.carpenter@oracle.com \
    --cc=broonie@kernel.org \
    --cc=ckeepax@opensource.cirrus.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=patches@opensource.cirrus.com \
    /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