Commit e80d8afc authored by Todd Poynor's avatar Todd Poynor Committed by Greg Kroah-Hartman

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: default avatarSimon Que <sque@chromium.org>
Signed-off-by: default avatarTodd Poynor <toddpoynor@google.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent ec45f016
...@@ -1627,7 +1627,7 @@ static int gasket_mmap(struct file *filp, struct vm_area_struct *vma) ...@@ -1627,7 +1627,7 @@ static int gasket_mmap(struct file *filp, struct vm_area_struct *vma)
"0x%lx", "0x%lx",
raw_offset); raw_offset);
trace_gasket_mmap_exit(bar_index); trace_gasket_mmap_exit(bar_index);
return bar_index; return -EINVAL;
} }
vma->vm_private_data = gasket_dev; vma->vm_private_data = gasket_dev;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment