Linux IIO development
 help / color / mirror / Atom feed
From: Andy Shevchenko <andriy.shevchenko@intel.com>
To: "Oscar Alejandro Sánchez Lucero" <aleszlucero@gmail.com>
Cc: "Jonathan Cameron" <jic23@kernel.org>,
	"David Lechner" <dlechner@baylibre.com>,
	"Nuno Sá" <nuno.sa@analog.com>,
	"Andy Shevchenko" <andy@kernel.org>,
	"Marcin Malagowski" <mrc@bourne.st>,
	linux-iio@vger.kernel.org
Subject: Re: [PATCH 2/3] iio: pressure: abp060mg: Check for short I2C transfers
Date: Fri, 20 Nov 2026 11:49:56 +0200	[thread overview]
Message-ID: <awAXxOLjS97c4Bus@ashevche-desk.local> (raw)
In-Reply-To: <20261120-b4-abp060mg-fixes-v1-2-2baf026cde47@gmail.com>

On Fri, Nov 20, 2026 at 01:11:38AM -0600, Oscar Alejandro Sánchez Lucero wrote:
> i2c_master_send() and i2c_master_recv() return the number of
> transferred bytes or a negative error code. If a short transfer occurs
> without a negative error, the driver currently proceeds to parse
> uninitialized stack data from buf.
> 
> Check that the returned byte count matches the requested length and
> return -EIO otherwise.

Reviewed-by: Andy Shevchenko <andriy.shevchenko@intel.com>

-- 
With Best Regards,
Andy Shevchenko



  reply	other threads:[~2026-11-20  9:50 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-20  7:11 [PATCH 0/3] iio: pressure: abp060mg: Fix scale typo and I2C read handling Oscar Alejandro Sánchez Lucero
2026-11-20  7:11 ` [PATCH 1/3] iio: pressure: abp060mg: Fix max pressure value for abp001pg Oscar Alejandro Sánchez Lucero
2026-11-20  9:49   ` Andy Shevchenko
2026-11-20  7:11 ` [PATCH 2/3] iio: pressure: abp060mg: Check for short I2C transfers Oscar Alejandro Sánchez Lucero
2026-11-20  9:49   ` Andy Shevchenko [this message]
2026-11-20  7:11 ` [PATCH 3/3] iio: pressure: abp060mg: Use msleep() instead of msleep_interruptible() Oscar Alejandro Sánchez Lucero
2026-11-20  9:54   ` Andy Shevchenko
2026-11-20 10:11     ` Alejandro Lucero

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=awAXxOLjS97c4Bus@ashevche-desk.local \
    --to=andriy.shevchenko@intel.com \
    --cc=aleszlucero@gmail.com \
    --cc=andy@kernel.org \
    --cc=dlechner@baylibre.com \
    --cc=jic23@kernel.org \
    --cc=linux-iio@vger.kernel.org \
    --cc=mrc@bourne.st \
    --cc=nuno.sa@analog.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