Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 45598888 authored by Eric Biggers's avatar Eric Biggers Committed by Paul Lawrence
Browse files

ANDROID: Incremental fs: Fix uninitialized variable



'error' isn't initialized before being returned.

Fixes: d4d1163e5358 ("ANDROID: Incremental fs: Add INCFS_IOC_GET_BLOCK_COUNT")
Change-Id: I3082ac4a3f9d8632080a8e8c9221fda25ef152a0
Signed-off-by: default avatarEric Biggers <ebiggers@google.com>
parent 29e40c29
Loading
Loading
Loading
Loading
+1 −2
Original line number Diff line number Diff line
@@ -668,7 +668,6 @@ static long ioctl_get_block_count(struct file *f, void __user *arg)
	struct incfs_get_block_count_args __user *args_usr_ptr = arg;
	struct incfs_get_block_count_args args = {};
	struct data_file *df = get_incfs_data_file(f);
	int error;

	if (!df)
		return -EINVAL;
@@ -682,7 +681,7 @@ static long ioctl_get_block_count(struct file *f, void __user *arg)
	if (copy_to_user(args_usr_ptr, &args, sizeof(args)))
		return -EFAULT;

	return error;
	return 0;
}

static long dispatch_ioctl(struct file *f, unsigned int req, unsigned long arg)