linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] afs: Fix compile warning in afs_dynroot_lookup()
@ 2019-12-19 13:14 Tiezhu Yang
  2019-12-27  0:06 ` Al Viro
  2019-12-27  9:10 ` David Howells
  0 siblings, 2 replies; 3+ messages in thread
From: Tiezhu Yang @ 2019-12-19 13:14 UTC (permalink / raw)
  To: David Howells; +Cc: linux-afs, linux-kernel

Fix the following compile warning:

  CC      fs/afs/dynroot.o
fs/afs/dynroot.c: In function ‘afs_dynroot_lookup’:
fs/afs/dynroot.c:117:6: warning: ‘len’ may be used uninitialized in this function [-Wmaybe-uninitialized]
  ret = lookup_one_len(name, dentry->d_parent, len);
      ^
fs/afs/dynroot.c:91:6: note: ‘len’ was declared here
  int len;
      ^

Signed-off-by: Tiezhu Yang <yangtiezhu@loongson.cn>
---
 fs/afs/dynroot.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/fs/afs/dynroot.c b/fs/afs/dynroot.c
index 7503899..303f712 100644
--- a/fs/afs/dynroot.c
+++ b/fs/afs/dynroot.c
@@ -88,7 +88,7 @@ static struct dentry *afs_lookup_atcell(struct dentry *dentry)
 	struct dentry *ret;
 	unsigned int seq = 0;
 	char *name;
-	int len;
+	int len = 0;
 
 	if (!net->ws_cell)
 		return ERR_PTR(-ENOENT);
-- 
2.1.0


^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2019-12-27  9:10 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-12-19 13:14 [PATCH] afs: Fix compile warning in afs_dynroot_lookup() Tiezhu Yang
2019-12-27  0:06 ` Al Viro
2019-12-27  9:10 ` David Howells

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).