Skip to content

Commit 84a1861

Browse files
ethantidmoreopsiff
authored andcommitted
iio: gyro: mpu3050: Fix incorrect free_irq() variable
commit edb11a1aef4011a4b7b22cc3c3396c6fe371f4a6 upstream. The handler for the IRQ part of this driver is mpu3050->trig but, in the teardown free_irq() is called with handler mpu3050. Use correct IRQ handler when calling free_irq(). Fixes: 3904b28 ("iio: gyro: Add driver for the MPU-3050 gyroscope") Reviewed-by: Linus Walleij <linusw@kernel.org> Signed-off-by: Ethan Tidmore <ethantidmore06@gmail.com> Reviewed-by: Andy Shevchenko <andriy.shevchenko@intel.com> Cc: <Stable@vger.kernel.org> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> (cherry picked from commit a09171d3f23e13bccd3dc34863186707c6301071) Signed-off-by: Wentao Guan <guanwentao@uniontech.com>
1 parent c512e4c commit 84a1861

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

drivers/iio/gyro/mpu3050-core.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1279,7 +1279,7 @@ void mpu3050_common_remove(struct device *dev)
12791279
pm_runtime_disable(dev);
12801280
iio_triggered_buffer_cleanup(indio_dev);
12811281
if (mpu3050->irq)
1282-
free_irq(mpu3050->irq, mpu3050);
1282+
free_irq(mpu3050->irq, mpu3050->trig);
12831283
iio_device_unregister(indio_dev);
12841284
mpu3050_power_down(mpu3050);
12851285
}

0 commit comments

Comments
 (0)