Re: [PATCH 2/5] hwmon: (pmbus/mp2975) Add error check for pmbus_read_word_data() return value
From: Guenter Roeck
Date: Tue Mar 17 2026 - 18:20:55 EST
On Tue, Mar 17, 2026 at 05:37:17PM +0000, Pradhan, Sanman wrote:
> From: Sanman Pradhan <psanman@xxxxxxxxxxx>
>
> mp2973_read_word_data() XORs the return value of pmbus_read_word_data()
> with PB_STATUS_POWER_GOOD_N without first checking for errors. If the I2C
> transaction fails, a negative error code is XORed with the constant,
> producing a corrupted value that is returned as valid status data instead
> of propagating the error.
>
> Add the missing error check before modifying the return value.
>
> Fixes: acda945afb465 ("hwmon: (pmbus/mp2975) Fix PGOOD in READ_STATUS_WORD")
> Cc: stable@xxxxxxxxxxxxxxx
> Signed-off-by: Sanman Pradhan <psanman@xxxxxxxxxxx>
Applied.
Thanks,
Guenter