mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Jonathan Cameron <jic23@kernel.org>
To: Colin Ian King <colin.i.king@gmail.com>
Cc: Lars-Peter Clausen <lars@metafoo.de>,
	Michael Hennerich <Michael.Hennerich@analog.com>,
	Cosmin Tanislav <cosmin.tanislav@analog.com>,
	linux-iio@vger.kernel.org, kernel-janitors@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH][next] iio: accel: adxl367: Fix uninitialized variable handled
Date: Sat, 26 Feb 2022 18:03:32 +0000	[thread overview]
Message-ID: <20220226180332.379a0ac2@jic23-huawei> (raw)
In-Reply-To: <20220224215149.146181-1-colin.i.king@gmail.com>

On Thu, 24 Feb 2022 21:51:49 +0000
Colin Ian King <colin.i.king@gmail.com> wrote:

> Variable handle is not initialized leading to potential garbage
> results with the or operations. Fix this by replacing the first
> or operation to an assignment to ensure handled is initialized
> correctly.
> 
> Fixes: cbab791c5e2a ("iio: accel: add ADXL367 driver")
> Signed-off-by: Colin Ian King <colin.i.king@gmail.com>
Hi Colin,

Nathan's patch hit my inbox first so I applied his but added
an additional Reported-by: for you to reflect you also reported it
via this patch.

Thanks

Jonathan

> ---
>  drivers/iio/accel/adxl367.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/iio/accel/adxl367.c b/drivers/iio/accel/adxl367.c
> index b452d74b1d4d..350a89b61179 100644
> --- a/drivers/iio/accel/adxl367.c
> +++ b/drivers/iio/accel/adxl367.c
> @@ -884,7 +884,7 @@ static irqreturn_t adxl367_irq_handler(int irq, void *private)
>  	if (ret)
>  		return IRQ_NONE;
>  
> -	handled |= adxl367_push_event(indio_dev, status);
> +	handled = adxl367_push_event(indio_dev, status);
>  	handled |= adxl367_push_fifo_data(indio_dev, status, fifo_entries);
>  
>  	return handled ? IRQ_HANDLED : IRQ_NONE;


      reply	other threads:[~2022-02-26 17:56 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-02-24 21:51 Colin Ian King
2022-02-26 18:03 ` 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=20220226180332.379a0ac2@jic23-huawei \
    --to=jic23@kernel.org \
    --cc=Michael.Hennerich@analog.com \
    --cc=colin.i.king@gmail.com \
    --cc=cosmin.tanislav@analog.com \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=lars@metafoo.de \
    --cc=linux-iio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    /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

all inboxes | Powered by JetHome®