lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <jmuvbmu6qfxpv7vrs2fvsqxj42nig7j6b3xmndawmxzozu2gqi@spe2o24tvngw>
Date: Fri, 19 Sep 2025 17:12:25 +0300
From: Ioana Ciornei <ioana.ciornei@....com>
To: Michael Walle <mwalle@...nel.org>
Cc: Rob Herring <robh@...nel.org>, 
	Krzysztof Kozlowski <krzk+dt@...nel.org>, Conor Dooley <conor+dt@...nel.org>, 
	Linus Walleij <linus.walleij@...aro.org>, Bartosz Golaszewski <brgl@...ev.pl>, 
	Shawn Guo <shawnguo@...nel.org>, Lee Jones <lee@...nel.org>, devicetree@...r.kernel.org, 
	linux-gpio@...r.kernel.org, linux-kernel@...r.kernel.org, Frank Li <Frank.Li@....com>
Subject: Re: [PATCH v4 06/11] gpio: regmap: add the .fixed_direction_output
 configuration parameter

On Fri, Sep 19, 2025 at 04:07:00PM +0200, Michael Walle wrote:

[snip] 
> > > >  	}
> > > >  
> > > > +	if (config->fixed_direction_output) {
> > > > +		gpio->fixed_direction_output = bitmap_alloc(chip->ngpio,
> > > > +							    GFP_KERNEL);
> > > > +		if (!gpio->fixed_direction_output) {
> > > > +			ret = -ENOMEM;
> > > > +			goto err_free_gpio;
> > > > +		}
> > > > +		bitmap_copy(gpio->fixed_direction_output,
> > > > +			    config->fixed_direction_output, chip->ngpio);
> > > > +	}
> > > > +
> > > >  	/* if not set, assume there is only one register */
> > > >  	gpio->ngpio_per_reg = config->ngpio_per_reg;
> > > >  	if (!gpio->ngpio_per_reg)
> > > > @@ -293,7 +312,7 @@ struct gpio_regmap *gpio_regmap_register(const struct gpio_regmap_config *config
> > > >  
> > > >  	ret = gpiochip_add_data(chip, gpio);
> > > >  	if (ret < 0)
> > > > -		goto err_free_gpio;
> > > > +		goto err_free_bitmap;
> > > 
> > > There's also an err_free_gpio jump below, that should also be
> > > replaced with err_free_bitmap.
> >
> > I am a bit confused. With this patch applied there is only one 'goto
> > err_free_gpio' in gpio-regmap.c and that's the one added by me above.
> >
> > What am I missing?
> 
> Probably commit 553b75d4bfe9 ("gpio: regmap: Allow to allocate
> regmap-irq device") which was added to the mfd/gpio/next tree a
> couple of days ago.
> 

Yes, I was on a 1-day old linux-next. Thanks for pointing this out.

In this case, I will have to do a v5 to also change that goto. I will
also add the patch that you requested.

Ioana

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ