[PATCH][next] fuse: Fix uninitiailized error return in variable err

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Colin Ian King <colin.king@xxxxxxxxxxxxx>

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 <colin.king@xxxxxxxxxxxxx>
---
 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);
-- 
2.31.1




[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [Samba]     [Device Mapper]     [CEPH Development]

  Powered by Linux