[PATCH 0/5] hwmon: (pmbus) Fix unchecked error returns in multiple drivers

From: Pradhan, Sanman

Date: Tue Mar 17 2026 - 13:38:11 EST


From: Sanman Pradhan <psanman@xxxxxxxxxxx>

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.

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