LKML Archive mirror
 help / color / mirror / Atom feed
From: Jonathan Cameron <jic23@kernel.org>
To: Vasileios Amoiridis <vassilisamir@gmail.com>
Cc: lars@metafoo.de, jagathjog1996@gmail.com,
	linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] iio: imu: bmi323: Fix trigger notification in case of error
Date: Sat, 11 May 2024 15:02:47 +0100	[thread overview]
Message-ID: <20240511150247.07a06f6a@jic23-huawei> (raw)
In-Reply-To: <20240508155407.139805-1-vassilisamir@gmail.com>

On Wed,  8 May 2024 17:54:07 +0200
Vasileios Amoiridis <vassilisamir@gmail.com> wrote:

> In case of error in the bmi323_trigger_handler() function, the
> function exits without calling the iio_trigger_notify_done()
> which is responsible for informing the attached trigger that
> the process is done and in case there is a .reenable(), to
> call it.
> 
> Fixes: 8a636db3aa57 ("iio: imu: Add driver for BMI323 IMU")
> Signed-off-by: Vasileios Amoiridis <vassilisamir@gmail.com>
I've applied this to a temporary fixes-for-6.10-rc1 that will get rebased
on top of an update char-misc-linus once the Linus picks up a pull request
from Greg during the coming merge window.

I've done this for other patches that may be dependent on stuff that is
only in char-misc-next.

Jonathan


> ---
>  drivers/iio/imu/bmi323/bmi323_core.c | 5 +++--
>  1 file changed, 3 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/iio/imu/bmi323/bmi323_core.c b/drivers/iio/imu/bmi323/bmi323_core.c
> index 5d42ab9b176a..67d74a1a1b26 100644
> --- a/drivers/iio/imu/bmi323/bmi323_core.c
> +++ b/drivers/iio/imu/bmi323/bmi323_core.c
> @@ -1391,7 +1391,7 @@ static irqreturn_t bmi323_trigger_handler(int irq, void *p)
>  				       &data->buffer.channels,
>  				       ARRAY_SIZE(data->buffer.channels));
>  		if (ret)
> -			return IRQ_NONE;
> +			goto out;
>  	} else {
>  		for_each_set_bit(bit, indio_dev->active_scan_mask,
>  				 BMI323_CHAN_MAX) {
> @@ -1400,13 +1400,14 @@ static irqreturn_t bmi323_trigger_handler(int irq, void *p)
>  					      &data->buffer.channels[index++],
>  					      BMI323_BYTES_PER_SAMPLE);
>  			if (ret)
> -				return IRQ_NONE;
> +				goto out;
>  		}
>  	}
>  
>  	iio_push_to_buffers_with_timestamp(indio_dev, &data->buffer,
>  					   iio_get_time_ns(indio_dev));
>  
> +out:
>  	iio_trigger_notify_done(indio_dev->trig);
>  
>  	return IRQ_HANDLED;
> 
> base-commit: dccb07f2914cdab2ac3a5b6c98406f765acab803


      reply	other threads:[~2024-05-11 14:02 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-05-08 15:54 [PATCH] iio: imu: bmi323: Fix trigger notification in case of error Vasileios Amoiridis
2024-05-11 14:02 ` Jonathan Cameron [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20240511150247.07a06f6a@jic23-huawei \
    --to=jic23@kernel.org \
    --cc=jagathjog1996@gmail.com \
    --cc=lars@metafoo.de \
    --cc=linux-iio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=vassilisamir@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).