[PATCH v3 0/4] iio: gyro: mpu3050: Multiple bug fixes

Ethan Tidmore posted 4 patches 1 month, 3 weeks ago
drivers/iio/gyro/mpu3050-core.c | 32 +++++++++++++++++++++-----------
1 file changed, 21 insertions(+), 11 deletions(-)
[PATCH v3 0/4] iio: gyro: mpu3050: Multiple bug fixes
Posted by Ethan Tidmore 1 month, 3 weeks ago
This series fixes 4 bugs:
- Patch 1: Fix free_irq() being called with wrong handler.
- Patch 2: Added missing free_irq() in an error path.
- Patch 3: Moved iio_device_register() to end of probe function, in
  doing so had to implement correct error cleanups and place
  iio_device_unregister in beginning of remove callback.
- Patch 4: free_irq() is after called iio_triggered_buffer_cleanup()
  which breaks LIFO, place it before it.

I plan on doing a proper devm_ conversion of this driver, but went ahead
and did these fixes so they could be backported.

v3:
- Patch 1 & 2 remove unneeded code snippets.
- Patch 3 remove stray change and tidy up grammar.
- Patch 4 clarify patch purpose.

Ethan Tidmore (4):
  iio: gyro: mpu3050: Fix incorrect free_irq() variable
  iio: gyro: mpu3050: Fix irq resource leak
  iio: gyro: mpu3050: Move iio_device_register() to correct location
  iio: gyro: mpu3050: Fix out-of-sequence free_irq()

 drivers/iio/gyro/mpu3050-core.c | 32 +++++++++++++++++++++-----------
 1 file changed, 21 insertions(+), 11 deletions(-)

-- 
2.53.0
Re: [PATCH v3 0/4] iio: gyro: mpu3050: Multiple bug fixes
Posted by Andy Shevchenko 1 month, 2 weeks ago
On Tue, Feb 24, 2026 at 04:48:14PM -0600, Ethan Tidmore wrote:
> This series fixes 4 bugs:
> - Patch 1: Fix free_irq() being called with wrong handler.
> - Patch 2: Added missing free_irq() in an error path.
> - Patch 3: Moved iio_device_register() to end of probe function, in
>   doing so had to implement correct error cleanups and place
>   iio_device_unregister in beginning of remove callback.
> - Patch 4: free_irq() is after called iio_triggered_buffer_cleanup()
>   which breaks LIFO, place it before it.
> 
> I plan on doing a proper devm_ conversion of this driver, but went ahead
> and did these fixes so they could be backported.

LGTM,
Reviewed-by: Andy Shevchenko <andriy.shevchenko@intel.com>

The commit message in the patch 4 sounds to me as needs an improve,
but I leave this to Jonathan.


-- 
With Best Regards,
Andy Shevchenko
Re: [PATCH v3 0/4] iio: gyro: mpu3050: Multiple bug fixes
Posted by Jonathan Cameron 1 month, 2 weeks ago
On Wed, 25 Feb 2026 14:01:44 +0200
Andy Shevchenko <andriy.shevchenko@intel.com> wrote:

> On Tue, Feb 24, 2026 at 04:48:14PM -0600, Ethan Tidmore wrote:
> > This series fixes 4 bugs:
> > - Patch 1: Fix free_irq() being called with wrong handler.
> > - Patch 2: Added missing free_irq() in an error path.
> > - Patch 3: Moved iio_device_register() to end of probe function, in
> >   doing so had to implement correct error cleanups and place
> >   iio_device_unregister in beginning of remove callback.
> > - Patch 4: free_irq() is after called iio_triggered_buffer_cleanup()
> >   which breaks LIFO, place it before it.
> > 
> > I plan on doing a proper devm_ conversion of this driver, but went ahead
> > and did these fixes so they could be backported.  
> 
> LGTM,
> Reviewed-by: Andy Shevchenko <andriy.shevchenko@intel.com>
> 
> The commit message in the patch 4 sounds to me as needs an improve,
> but I leave this to Jonathan.
> 
> 

Series applied to the fixes-togreg branch of iio.git and marked for
stable inclusion.

Thanks,

Jonathan