diff options
author | Todd Poynor <toddpoynor@google.com> | 2018-07-19 20:49:07 -0700 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2018-07-21 08:50:35 +0200 |
commit | e80d8afc97fb243833d9939b5098a89379433b3c (patch) | |
tree | d014c5a78e9139ab51f90e895b0c94bb1e357e1a /drivers/staging/gasket | |
parent | ec45f01668e42f3dc3f18e11fa8655ad150ca250 (diff) |
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>
Diffstat (limited to 'drivers/staging/gasket')
-rw-r--r-- | drivers/staging/gasket/gasket_core.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/staging/gasket/gasket_core.c b/drivers/staging/gasket/gasket_core.c index eb5ad161ccda..3cf918f9d260 100644 --- a/drivers/staging/gasket/gasket_core.c +++ b/drivers/staging/gasket/gasket_core.c @@ -1627,7 +1627,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; |