forked from MIrrors/gasket-driver
staging: gasket: gasket_mmap return error instead of valid BAR index
When offset to be mapped matches both a BAR region and a coherent mapped region return an error as intended, not the BAR index. Signed-off-by: Simon Que <sque@chromium.org> Signed-off-by: Todd Poynor <toddpoynor@google.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
committed by
Alex Van Damme
parent
a666b28f2c
commit
21ea6458c2
@@ -1637,7 +1637,7 @@ static int gasket_mmap(struct file *filp, struct vm_area_struct *vma)
|
||||
"0x%lx",
|
||||
raw_offset);
|
||||
trace_gasket_mmap_exit(bar_index);
|
||||
return bar_index;
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
vma->vm_private_data = gasket_dev;
|
||||
|
||||
Reference in New Issue
Block a user