Re: [PATCH] fs/nls: Fix inconsistency between utf8_to_utf32() and utf32_to_utf8()

From: Armin Wolf

Date: Wed Nov 26 2025 - 17:47:36 EST


Am 26.11.25 um 22:14 schrieb Andy Shevchenko:

On Wed, Nov 26, 2025 at 11:13:50PM +0200, Andy Shevchenko wrote:
On Wed, Nov 26, 2025 at 09:43:55PM +0100, Armin Wolf wrote:
After commit 25524b619029 ("fs/nls: Fix utf16 to utf8 conversion"),
the return values of utf8_to_utf32() and utf32_to_utf8() are
inconsistent when encountering an error: utf8_to_utf32() returns -1,
while utf32_to_utf8() returns errno codes. Fix this inconsistency
by modifying utf8_to_utf32() to return errno codes as well.
Reviewed-by: Andy Shevchenko <andriy.shevchenko@xxxxxxxxx>

Thanks!
Note, you might need a Fixes tag as the original one was marked as Fixes.

Alright, i will add it in the next patch revision.

Thanks,
Armin Wolf