Files
linux/drivers
Morduan Zang 220a5ee395 efi/cper: Fix cper_bits_to_str buffer handling and return value
commit d7f1b4bdc7 upstream.

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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2026-01-19 13:10:19 +01:00
..
2026-01-19 13:10:13 +01:00
2026-01-19 13:09:49 +01:00
2026-01-19 13:10:06 +01:00
2026-01-19 13:10:13 +01:00
2025-12-07 06:09:20 +09:00
2026-01-19 13:10:12 +01:00
2026-01-19 13:09:54 +01:00
2025-10-19 16:21:28 +02:00