2013-06-01 09:45:57

by Thomas Meyer

[permalink] [raw]
Subject: [PATCH] Btrfs: Cocci spatch "ptr_ret.spatch"


Signed-off-by: Thomas Meyer <[email protected]>
---

diff -u -p a/fs/btrfs/volumes.c b/fs/btrfs/volumes.c
--- a/fs/btrfs/volumes.c
+++ b/fs/btrfs/volumes.c
@@ -3296,10 +3296,7 @@ int btrfs_resume_balance_async(struct bt
}

tsk = kthread_run(balance_kthread, fs_info, "btrfs-balance");
- if (IS_ERR(tsk))
- return PTR_ERR(tsk);
-
- return 0;
+ return PTR_RET(tsk);
}

int btrfs_recover_balance(struct btrfs_fs_info *fs_info)