LKML Archive on
help / color / mirror / Atom feed
* [PATCH][next] fuse: Fix uninitiailized error return in variable err
@ 2021-08-06  9:50 Colin King
  0 siblings, 0 replies; only message in thread
From: Colin King @ 2021-08-06  9:50 UTC (permalink / raw)
  To: Miklos Szeredi, linux-fsdevel; +Cc: kernel-janitors, linux-kernel

From: Colin Ian King <>

There is an error return path where err is being returned but
it not been yet set. Fix this by just returning -EINVAL.

Addresses-Coverity: ("Uninitialized scalar variable")
Fixes: ff12b2314569 ("fuse: move fget() to fuse_get_tree()")
Signed-off-by: Colin Ian King <>
 fs/fuse/inode.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/fs/fuse/inode.c b/fs/fuse/inode.c
index 0580a8319593..09adb4f4734e 100644
--- a/fs/fuse/inode.c
+++ b/fs/fuse/inode.c
@@ -1522,7 +1522,7 @@ static int fuse_fill_super(struct super_block *sb, struct fs_context *fsc)
 	if ((ctx->file->f_op != &fuse_dev_operations) ||
 	    (ctx->file->f_cred->user_ns != sb->s_user_ns))
-		goto err;
+		return -EINVAL;
 	ctx->fudptr = &ctx->file->private_data;
 	fc = kmalloc(sizeof(*fc), GFP_KERNEL);

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2021-08-06  9:50 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-08-06  9:50 [PATCH][next] fuse: Fix uninitiailized error return in variable err Colin King

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