* [PATCH] fs: befs: remove ignored length of buffer
@ 2016-06-29 18:03 Luis de Bethencourt
0 siblings, 0 replies; only message in thread
From: Luis de Bethencourt @ 2016-06-29 18:03 UTC (permalink / raw)
To: linux-kernel
Cc: akpm, salah.triki, viro, mhocko, vdavydov, Luis de Bethencourt
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 <luisbg@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
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2016-06-29 18:14 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-06-29 18:03 [PATCH] fs: befs: remove ignored length of buffer Luis de Bethencourt
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).