mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH 0/5] hwmon: (pmbus) Fix unchecked error returns in multiple drivers
@ 2026-03-17 17:36 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
                   ` (4 more replies)
  0 siblings, 5 replies; 11+ messages in thread
From: Pradhan, Sanman @ 2026-03-17 17:36 UTC (permalink / raw)
  To: linux-hwmon
  Cc: linux, vasileios.amoiridis, leo.yang.sy0, wensheng, linux-kernel,
	Sanman Pradhan

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.

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


^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2026-03-17 22:23 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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 ` [PATCH 0/5] hwmon: (pmbus) Fix unchecked error returns in multiple drivers Guenter Roeck

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®