diff options
| author | Sanman Pradhan <psanman@juniper.net> | 2026-03-17 17:36:53 +0000 |
|---|---|---|
| committer | Guenter Roeck <linux@roeck-us.net> | 2026-03-17 15:19:45 -0700 |
| commit | c925fccc4f8fae4354d98b2af606bd4747d3738d (patch) | |
| tree | a1b7b69537fdc21daec569cbe28dba5e8a7615c4 /Documentation/console/git@git.tavy.me:linux.git | |
| parent | f338e77383789c0cae23ca3d48adcc5e9e137e3c (diff) | |
hwmon: (pmbus/hac300s) Add error check for pmbus_read_word_data() return value
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>
Link: https://lore.kernel.org/r/20260317173308.382545-2-sanman.pradhan@hpe.com
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Diffstat (limited to 'Documentation/console/git@git.tavy.me:linux.git')
0 files changed, 0 insertions, 0 deletions
