]> git.ipfire.org Git - thirdparty/linux.git/commit
fs/nls: Fix inconsistency between utf8_to_utf32() and utf32_to_utf8()
authorArmin Wolf <W_Armin@gmx.de>
Sat, 29 Nov 2025 11:15:35 +0000 (12:15 +0100)
committerIlpo Järvinen <ilpo.jarvinen@linux.intel.com>
Mon, 1 Dec 2025 09:58:06 +0000 (11:58 +0200)
commitc36f9d7b2869a003a2f7d6ff2c6bac9e62fd7d68
tree8867bf80306ca4303f264cf757c050e001aa9ed2
parent859d4ceacfc1149f29d47bd19fe7a8f59cf6255e
fs/nls: Fix inconsistency between utf8_to_utf32() and utf32_to_utf8()

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.

Fixes: 25524b619029 ("fs/nls: Fix utf16 to utf8 conversion")
Suggested-by: Andy Shevchenko <andriy.shevchenko@intel.com>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@intel.com>
Signed-off-by: Armin Wolf <W_Armin@gmx.de>
Link: https://patch.msgid.link/20251129111535.8984-1-W_Armin@gmx.de
Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
fs/nls/nls_base.c