Files
Morduan Zang d7f1b4bdc7 efi/cper: Fix cper_bits_to_str buffer handling and return value
The return value calculation was incorrect: `return len - buf_size;`
Initially `len = buf_size`, then `len` decreases with each operation.
This results in a negative return value on success.

Fix by returning `buf_size - len` which correctly calculates the actual
number of bytes written.

Fixes: a976d790f4 ("efi/cper: Add a new helper function to print bitmasks")
Signed-off-by: Morduan Zang <zhangdandan@uniontech.com>
Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
2026-01-14 11:34:42 +01:00
..
2023-03-09 18:07:33 +01:00
2025-11-13 13:03:55 -06:00
2025-11-13 13:03:55 -06:00