Re: [PATCH] hwmon: (pmbus) Fix return value from pmbus_update_byte_data()
[email protected] Tue, 28 Jul 2026 15:54:27 +0000
| Newsgroups | org.kernel.vger.linux-hwmon |
|---|---|
| Message-ID | <[email protected]> |
> pmbus_update_byte_data() is supposed to return a negative error code or 0.
> However, if no change is made to the register, it actually returns the
> register value. This can result in problems if the calling code explicitly
> expects to see an error code or 0.
>
> Fix it to return 0 on success or the error code as expected.
>
> Fixes: 11c119986f270 ("hwmon: (pmbus) add helpers for byte write and read modify write")
> Signed-off-by: Guenter Roeck <[email protected]>
Sashiko has reviewed this patch and found no issues. It looks great!
--
Sashiko AI review ยท https://sashiko.dev/#/patchset/[email protected]?part=1