From: Jonathan Cameron <jic23@kernel.org>
To: Andy Shevchenko <andriy.shevchenko@intel.com>
Cc: "Antoniu Miclaus" <antoniu.miclaus@analog.com>,
"David Lechner" <dlechner@baylibre.com>,
"Nuno Sá" <nuno.sa@analog.com>,
"Andy Shevchenko" <andy@kernel.org>,
"Petre Rodan" <petre.rodan@subdimension.ro>,
"Manuel Stahl" <manuel.stahl@iis.fraunhofer.de>,
"Lars-Peter Clausen" <lars@metafoo.de>,
linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] iio: gyro: itg3200: Fix unchecked return value in read_raw
Date: Thu, 29 Jan 2026 17:07:44 +0000 [thread overview]
Message-ID: <20260129170744.48f0ce06@jic23-huawei> (raw)
In-Reply-To: <aXuCclfJWLYkfF4Y@smile.fi.intel.com>
On Thu, 29 Jan 2026 17:53:22 +0200
Andy Shevchenko <andriy.shevchenko@intel.com> wrote:
> On Thu, Jan 29, 2026 at 05:01:45PM +0200, Antoniu Miclaus wrote:
> > The return value from itg3200_read_reg_s16() is stored in ret but
> > never checked. The function unconditionally returns IIO_VAL_INT,
> > ignoring potential I2C read failures. This causes garbage data to
> > be returned to userspace when the read fails, with no error reported.
>
> > Add proper error checking to propagate the failure to callers.
>
> Yeah, but when it's not a series do not use --thread!
> (P.S. do not resend, it's for the future now)
>
> Reviewed-by: Andy Shevchenko <andriy.shevchenko@intel.com>
>
Applied this patch to the togreg branch of iio.git (given nearness
of merge window) and marked for stable.
prev parent reply other threads:[~2026-01-29 17:07 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-01-29 15:01 Antoniu Miclaus
2026-01-29 15:01 ` [PATCH] iio: pressure: hsc030pa: Fix i2c_transfer return value check Antoniu Miclaus
2026-01-29 15:54 ` Andy Shevchenko
2026-01-29 17:06 ` Jonathan Cameron
2026-01-29 15:53 ` [PATCH] iio: gyro: itg3200: Fix unchecked return value in read_raw Andy Shevchenko
2026-01-29 17:07 ` 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=20260129170744.48f0ce06@jic23-huawei \
--to=jic23@kernel.org \
--cc=andriy.shevchenko@intel.com \
--cc=andy@kernel.org \
--cc=antoniu.miclaus@analog.com \
--cc=dlechner@baylibre.com \
--cc=lars@metafoo.de \
--cc=linux-iio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=manuel.stahl@iis.fraunhofer.de \
--cc=nuno.sa@analog.com \
--cc=petre.rodan@subdimension.ro \
/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®