public inbox for linux-hwmon@vger.kernel.org
 help / color / mirror / Atom feed
From: Guenter Roeck <linux@roeck-us.net>
To: "Pradhan, Sanman" <sanman.pradhan@hpe.com>
Cc: "linux-hwmon@vger.kernel.org" <linux-hwmon@vger.kernel.org>,
	"vasileios.amoiridis@cern.ch" <vasileios.amoiridis@cern.ch>,
	"leo.yang.sy0@gmail.com" <leo.yang.sy0@gmail.com>,
	"wensheng@yeah.net" <wensheng@yeah.net>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	Sanman Pradhan <psanman@juniper.net>
Subject: Re: [PATCH 0/5] hwmon: (pmbus) Fix unchecked error returns in multiple drivers
Date: Tue, 17 Mar 2026 15:23:06 -0700	[thread overview]
Message-ID: <a4e1fe2b-ffc3-419b-a899-7ae0cf4deeeb@roeck-us.net> (raw)
In-Reply-To: <20260317173308.382545-1-sanman.pradhan@hpe.com>

On Tue, Mar 17, 2026 at 05:36:33PM +0000, Pradhan, Sanman wrote:
> From: Sanman Pradhan <psanman@juniper.net>
> 
> Several PMBus device drivers use the return value of pmbus_read_word_data()
> or pmbus_read_byte_data() in arithmetic, bitwise, or macro operations
> without first checking for a negative error code. If the underlying I2C
> transaction fails, the negative errno propagates into FIELD_GET(),
> FIELD_PREP(), XOR, or DIV_ROUND_CLOSEST operations, silently producing
> corrupted sensor or status data instead of reporting the error.
> 
AI review feedback is at 
https://sashiko.dev/#/patchset/20260317174553.385567-1-sanman.pradhan%40hpe.com

One of the drivers (see patch 4 feedback) has an unrelated problem, for which
I would appreciate a fix, but patch 5/5 is making a wrong functional change
which needs to be fixed.

I'll apply patches 1..4 of the series.

Thanks,
Guenter

> Sanman Pradhan (5):
>   hwmon: (pmbus/hac300s) Add error check for pmbus_read_word_data()
>     return value
>   hwmon: (pmbus/mp2975) Add error check for pmbus_read_word_data()
>     return value
>   hwmon: (pmbus/mp2869) Check pmbus_read_byte_data() before using its
>     return value
>   hwmon: (pmbus/ina233) Add error check for pmbus_read_word_data()
>     return value
>   hwmon: (pmbus/isl68137) Fix unchecked return value and use
>     sysfs_emit()
> 
>  drivers/hwmon/pmbus/hac300s.c  |  2 ++
>  drivers/hwmon/pmbus/ina233.c   |  2 ++
>  drivers/hwmon/pmbus/isl68137.c |  7 +++++--
>  drivers/hwmon/pmbus/mp2869.c   | 35 ++++++++++++++++++++--------------
>  drivers/hwmon/pmbus/mp2975.c   |  2 ++
>  5 files changed, 32 insertions(+), 16 deletions(-)
> 
> -- 
> 2.34.1
> 
> 

      parent reply	other threads:[~2026-03-17 22:23 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-03-17 17:36 [PATCH 0/5] hwmon: (pmbus) Fix unchecked error returns in multiple drivers Pradhan, Sanman
2026-03-17 17:36 ` [PATCH 1/5] hwmon: (pmbus/hac300s) Add error check for pmbus_read_word_data() return value Pradhan, Sanman
2026-03-17 22:20   ` Guenter Roeck
2026-03-17 17:37 ` [PATCH 2/5] hwmon: (pmbus/mp2975) " Pradhan, Sanman
2026-03-17 22:20   ` Guenter Roeck
2026-03-17 17:37 ` [PATCH 3/5] hwmon: (pmbus/mp2869) Check pmbus_read_byte_data() before using its " Pradhan, Sanman
2026-03-17 22:21   ` Guenter Roeck
2026-03-17 17:46 ` [PATCH 4/5] hwmon: (pmbus/ina233) Add error check for pmbus_read_word_data() " Pradhan, Sanman
2026-03-17 17:46   ` [PATCH 5/5] hwmon: (pmbus/isl68137) Fix unchecked return value and use sysfs_emit() Pradhan, Sanman
2026-03-17 22:21   ` [PATCH 4/5] hwmon: (pmbus/ina233) Add error check for pmbus_read_word_data() return value Guenter Roeck
2026-03-17 22:23 ` Guenter Roeck [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=a4e1fe2b-ffc3-419b-a899-7ae0cf4deeeb@roeck-us.net \
    --to=linux@roeck-us.net \
    --cc=leo.yang.sy0@gmail.com \
    --cc=linux-hwmon@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=psanman@juniper.net \
    --cc=sanman.pradhan@hpe.com \
    --cc=vasileios.amoiridis@cern.ch \
    --cc=wensheng@yeah.net \
    /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