Re: [PATCH v2] iio: imu: inv_mpu6050: Remove duplicate code between labels

From: Andy Shevchenko
Date: Tue Sep 03 2024 - 19:28:34 EST


Sun, Sep 01, 2024 at 09:08:39PM +0900, Gyeyoung Baek kirjoitti:
> 'flush_fifo' label performs same task as 'endsession' label
> immediately after calling 'env_reset_fifo' function.
> So i remove that duplication.

...

> -end_session:
> - mutex_unlock(&st->lock);
> - iio_trigger_notify_done(indio_dev->trig);
> -
> - return IRQ_HANDLED;

You missed

goto end_session;

here.

> flush_fifo:
> /* Flush HW and SW FIFOs. */
> inv_reset_fifo(indio_dev);
> +
> +end_session:
> mutex_unlock(&st->lock);
> iio_trigger_notify_done(indio_dev->trig);

--
With Best Regards,
Andy Shevchenko