# \[PATCH\] btrfs: drop ret in ioctl\_quota\_rescan\_status

- From: Anand Jain \<hidden\>
- Date: 2021-07-28 06:21:09 
- List: linux-btrfs
- Page: https://ratatoskr.run/linux-btrfs/2021/07/7544238
- Thread: https://ratatoskr.run/linux-btrfs/2021/07/7544238/t.md

```text
There is no need for the variable ret after the patch [1]. Drop it.
 btrfs: Allocate btrfs_ioctl_quota_rescan_args on stack

Signed-off-by: Anand Jain <redacted>
---
David,

 You may choose to roll this patch into the following patch,
  [PATCH 5/7] btrfs: Allocate btrfs_ioctl_quota_rescan_args on stack

Thx.

 fs/btrfs/ioctl.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/fs/btrfs/ioctl.c b/fs/btrfs/ioctl.c
index 0f1cc8f489d4..693422acb33b 100644
--- a/fs/btrfs/ioctl.c
+++ b/fs/btrfs/ioctl.c
@@ -4405,7 +4405,6 @@ static long btrfs_ioctl_quota_rescan_status(struct btrfs_fs_info *fs_info,
 						void __user *arg)
 {
 	struct btrfs_ioctl_quota_rescan_args qsa = {0};
-	int ret = 0;
 
 	if (!capable(CAP_SYS_ADMIN))
 		return -EPERM;
@@ -4416,9 +4415,9 @@ static long btrfs_ioctl_quota_rescan_status(struct btrfs_fs_info *fs_info,
 	}
 
 	if (copy_to_user(arg, &qsa, sizeof(qsa)))
-		ret = -EFAULT;
+		return -EFAULT;
 
-	return ret;
+	return 0;
 }
 
 static long btrfs_ioctl_quota_rescan_wait(struct btrfs_fs_info *fs_info,
-- 
2.31.1

```
