[PATCH -next] binder: simplify the return expression of binder_mmap

Liu Shixin
2020-09-21T08:02:21Z

Simplify the return expression.

Signed-off-by: Liu Shixin <liushixin2@huawei.com>
---
drivers/android/binder.c | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/drivers/android/binder.c b/drivers/android/binder.c
index 37a505c41dec..1f929e0cf39f 100644
--- a/drivers/android/binder.c
+++ b/drivers/android/binder.c
@@ -5204,10 +5204,7 @@ static int binder_mmap(struct file *filp, struct vm_area_struct *vma)
vma->vm_ops = &binder_vm_ops;
vma->vm_private_data = proc;

- ret = binder_alloc_mmap_handler(&proc->alloc, vma);
- if (ret)
- return ret;
- return 0;
+ return binder_alloc_mmap_handler(&proc->alloc, vma);

err_bad_arg:
pr_err("%s: %d %lx-%lx %s failed %d\n", __func__,
--
2.25.1