diff --git a/fs/incfs/vfs.c b/fs/incfs/vfs.c index 8c3c3b754825..f535d24d76ca 100644 --- a/fs/incfs/vfs.c +++ b/fs/incfs/vfs.c @@ -668,6 +668,7 @@ 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; @@ -681,7 +682,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 0; + return error; } static long dispatch_ioctl(struct file *f, unsigned int req, unsigned long arg)