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: <20251012200211.19170a6f@jic23-huawei>
Date: Sun, 12 Oct 2025 20:02:11 +0100
From: Jonathan Cameron <jic23@...nel.org>
To: Nuno Sá <noname.nuno@...il.com>
Cc: Christophe JAILLET <christophe.jaillet@...adoo.fr>, David Lechner
 <dlechner@...libre.com>, Nuno Sá  <nuno.sa@...log.com>, Andy
 Shevchenko <andy@...nel.org>, Kyungmin Park  <kyungmin.park@...sung.com>,
 Karol Wrona <k.wrona@...sung.com>, linux-kernel@...r.kernel.org,
 kernel-janitors@...r.kernel.org, linux-iio@...r.kernel.org
Subject: Re: [PATCH] iio:common:ssp_sensors: Fix an error handling path
 ssp_probe()

On Fri, 10 Oct 2025 19:56:41 +0100
Nuno Sá <noname.nuno@...il.com> wrote:

> On Fri, 2025-10-10 at 20:58 +0200, Christophe JAILLET wrote:
> > If an error occurs after a successful mfd_add_devices() call, it should be
> > undone by a corresponding mfd_remove_devices() call, as already done in the
> > remove function.
> > 
> > Fixes: 50dd64d57eee ("iio: common: ssp_sensors: Add sensorhub driver")
> > Signed-off-by: Christophe JAILLET <christophe.jaillet@...adoo.fr>
> > ---  
> 
> Reviewed-by: Nuno Sá <nuno.sa@...log.com>
Applied to my temporary fixes branch (I'll rebase on rc1) and marked
for stable.

Thanks,

Jonathan

> 
> >  drivers/iio/common/ssp_sensors/ssp_dev.c | 4 +++-
> >  1 file changed, 3 insertions(+), 1 deletion(-)
> > 
> > diff --git a/drivers/iio/common/ssp_sensors/ssp_dev.c
> > b/drivers/iio/common/ssp_sensors/ssp_dev.c
> > index 1e167dc673ca..da09c9f3ceb6 100644
> > --- a/drivers/iio/common/ssp_sensors/ssp_dev.c
> > +++ b/drivers/iio/common/ssp_sensors/ssp_dev.c
> > @@ -503,7 +503,7 @@ static int ssp_probe(struct spi_device *spi)
> >  	ret = spi_setup(spi);
> >  	if (ret < 0) {
> >  		dev_err(&spi->dev, "Failed to setup spi\n");
> > -		return ret;
> > +		goto err_setup_spi;
> >  	}
> >  
> >  	data->fw_dl_state = SSP_FW_DL_STATE_NONE;
> > @@ -568,6 +568,8 @@ static int ssp_probe(struct spi_device *spi)
> >  err_setup_irq:
> >  	mutex_destroy(&data->pending_lock);
> >  	mutex_destroy(&data->comm_lock);
> > +err_setup_spi:
> > +	mfd_remove_devices(&spi->dev);
> >  
> >  	dev_err(&spi->dev, "Probe failed!\n");
> >    


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ