mirror of https://lore.kernel.org/lkml/
 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>,
	"stable@vger.kernel.org" <stable@vger.kernel.org>
Subject: Re: [PATCH 1/5] hwmon: (pmbus/hac300s) Add error check for pmbus_read_word_data() return value
Date: Tue, 17 Mar 2026 15:20:03 -0700	[thread overview]
Message-ID: <8aec79cb-3884-4aa2-870f-6e136f6fb373@roeck-us.net> (raw)
In-Reply-To: <20260317173308.382545-2-sanman.pradhan@hpe.com>

On Tue, Mar 17, 2026 at 05:36:53PM +0000, Pradhan, Sanman wrote:
> From: Sanman Pradhan <psanman@juniper.net>
> 
> hac300s_read_word_data() passes the return value of pmbus_read_word_data()
> directly to FIELD_GET() without checking for errors. If the I2C transaction
> fails, a negative error code is sign-extended and passed to FIELD_GET(),
> which silently produces garbage data instead of propagating the error.
> 
> Add the missing error check before using the return value in
> the FIELD_GET() macro.
> 
> Fixes: 669cf162f7a1 ("hwmon: Add support for HiTRON HAC300S PSU")
> Cc: stable@vger.kernel.org
> Signed-off-by: Sanman Pradhan <psanman@juniper.net>

Applied.

Thanks,
Guenter

  reply	other threads:[~2026-03-17 22:20 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 [this message]
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 ` [PATCH 0/5] hwmon: (pmbus) Fix unchecked error returns in multiple drivers Guenter Roeck

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=8aec79cb-3884-4aa2-870f-6e136f6fb373@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=stable@vger.kernel.org \
    --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

all inboxes | Powered by JetHome®