ANDROID: Incremental fs: Fix uninitialized variable

'error' isn't initialized before being returned.

Fixes: d4d1163e53 ("ANDROID: Incremental fs: Add INCFS_IOC_GET_BLOCK_COUNT")
Change-Id: I3082ac4a3f9d8632080a8e8c9221fda25ef152a0
Signed-off-by: Eric Biggers <ebiggers@google.com>
This commit is contained in:
Eric Biggers
2020-09-17 19:46:48 -07:00
committed by Paul Lawrence
parent 29e40c29df
commit 45598888d8

View File

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