@@ -5180,9 +5180,7 @@ static const struct vm_operations_struct binder_vm_ops = {
5180
5180
5181
5181
static int binder_mmap (struct file * filp , struct vm_area_struct * vma )
5182
5182
{
5183
- int ret ;
5184
5183
struct binder_proc * proc = filp -> private_data ;
5185
- const char * failure_string ;
5186
5184
5187
5185
if (proc -> tsk != current -> group_leader )
5188
5186
return - EINVAL ;
@@ -5194,25 +5192,17 @@ static int binder_mmap(struct file *filp, struct vm_area_struct *vma)
5194
5192
(unsigned long )pgprot_val (vma -> vm_page_prot ));
5195
5193
5196
5194
if (vma -> vm_flags & FORBIDDEN_MMAP_FLAGS ) {
5197
- ret = - EPERM ;
5198
- failure_string = "bad vm_flags" ;
5199
- goto err_bad_arg ;
5195
+ pr_err ( "%s: %d %lx-%lx %s failed %d\n" , __func__ ,
5196
+ proc -> pid , vma -> vm_start , vma -> vm_end , "bad vm_flags" , - EPERM ) ;
5197
+ return - EPERM ;
5200
5198
}
5201
5199
vma -> vm_flags |= VM_DONTCOPY | VM_MIXEDMAP ;
5202
5200
vma -> vm_flags &= ~VM_MAYWRITE ;
5203
5201
5204
5202
vma -> vm_ops = & binder_vm_ops ;
5205
5203
vma -> vm_private_data = proc ;
5206
5204
5207
- ret = binder_alloc_mmap_handler (& proc -> alloc , vma );
5208
- if (ret )
5209
- return ret ;
5210
- return 0 ;
5211
-
5212
- err_bad_arg :
5213
- pr_err ("%s: %d %lx-%lx %s failed %d\n" , __func__ ,
5214
- proc -> pid , vma -> vm_start , vma -> vm_end , failure_string , ret );
5215
- return ret ;
5205
+ return binder_alloc_mmap_handler (& proc -> alloc , vma );
5216
5206
}
5217
5207
5218
5208
static int binder_open (struct inode * nodp , struct file * filp )
0 commit comments