linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] regmap: debugfs: Add back in erroneously removed initialisation of ret
@ 2020-09-18 11:20 Charles Keepax
  2020-09-18 12:09 ` Mark Brown
  2020-09-18 12:38 ` Dan Carpenter
  0 siblings, 2 replies; 4+ messages in thread
From: Charles Keepax @ 2020-09-18 11:20 UTC (permalink / raw)
  To: broonie; +Cc: dan.carpenter, linux-kernel, patches

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


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH] regmap: debugfs: Add back in erroneously removed initialisation of ret
  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
  1 sibling, 0 replies; 4+ messages in thread
From: Mark Brown @ 2020-09-18 12:09 UTC (permalink / raw)
  To: Charles Keepax; +Cc: patches, linux-kernel, dan.carpenter

On Fri, 18 Sep 2020 12:20:02 +0100, Charles Keepax wrote:
> 


Applied to

   https://git.kernel.org/pub/scm/linux/kernel/git/broonie/regmap.git for-next

Thanks!

[1/1] regmap: debugfs: Add back in erroneously removed initialisation of ret
      commit: d36cb0205f034e943aa29e35b59c6a441f0056b5

All being well this means that it will be integrated into the linux-next
tree (usually sometime in the next 24 hours) and sent to Linus during
the next merge window (or sooner if it is a bug fix), however if
problems are discovered then the patch may be dropped or reverted.

You may get further e-mails resulting from automated or manual testing
and review of the tree, please engage with people reporting problems and
send followup patches addressing any issues that are reported if needed.

If any updates are required or you are submitting further changes they
should be sent as incremental updates against current git, existing
patches will not be replaced.

Please add any relevant lists and maintainers to the CCs when replying
to this mail.

Thanks,
Mark

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] regmap: debugfs: Add back in erroneously removed initialisation of ret
  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
  2020-09-18 14:43   ` Charles Keepax
  1 sibling, 1 reply; 4+ messages in thread
From: Dan Carpenter @ 2020-09-18 12:38 UTC (permalink / raw)
  To: Charles Keepax; +Cc: broonie, linux-kernel, patches

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


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] regmap: debugfs: Add back in erroneously removed initialisation of ret
  2020-09-18 12:38 ` Dan Carpenter
@ 2020-09-18 14:43   ` Charles Keepax
  0 siblings, 0 replies; 4+ messages in thread
From: Charles Keepax @ 2020-09-18 14:43 UTC (permalink / raw)
  To: Dan Carpenter; +Cc: broonie, linux-kernel, patches

On Fri, Sep 18, 2020 at 03:38:43PM +0300, Dan Carpenter wrote:
> 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.
> 

Aye, sorry thought it was just cause I removed the initialisation
but yeah there is more fall out. Apologies for mucking this up,
third time lucky hopefully.

Thanks,
Charles

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2020-09-18 14:43 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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
2020-09-18 14:43   ` Charles Keepax

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).