When befs_nls2utf() returns an error, the caller ignores the length of the output buffer since it knows the buffer isn't useful. Removing the length assignment that will be ignored.
Signed-off-by: Luis de Bethencourt <lui...@osg.samsung.com> --- Hi, Noticed this while continuing to familiarize with the befs code. As a matter of fact, the only caller of befs_nls2utf() ignores the value of out_len even when the function succeeds. I was considering that this parameter could be removed completely. The only con to doing so I can think of is losing the symmetry with the matching befs_utf2nls(). Which is why I am asking here before proposing that patch. Thanks, Luis fs/befs/linuxvfs.c | 1 - 1 file changed, 1 deletion(-) diff --git a/fs/befs/linuxvfs.c b/fs/befs/linuxvfs.c index 06d29a3..5c99012 100644 --- a/fs/befs/linuxvfs.c +++ b/fs/befs/linuxvfs.c @@ -614,7 +614,6 @@ befs_nls2utf(struct super_block *sb, const char *in, *out = result = kmalloc(maxlen, GFP_NOFS); if (!*out) { - *out_len = 0; return -ENOMEM; } -- 2.5.1