diff options
author | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2020-05-11 08:57:22 +0200 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2020-05-11 08:57:22 +0200 |
commit | ae73e7784871ebe2c43da619b4a1e2c9ff81508d (patch) | |
tree | 724238ba2877c672e4a61d46ec11f48d2d560936 /drivers/staging/gasket | |
parent | 2e11cc1ab790ccbc7c7f6ed74c0f40b85c561dc7 (diff) | |
parent | 2ef96a5bb12be62ef75b5828c0aab838ebb29cb8 (diff) |
Merge 5.7-rc5 into staging-next
We need the staging fixes in here as well.
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/gasket')
-rw-r--r-- | drivers/staging/gasket/gasket_core.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/staging/gasket/gasket_core.c b/drivers/staging/gasket/gasket_core.c index 8e0575fcb4c8..67325fbaf760 100644 --- a/drivers/staging/gasket/gasket_core.c +++ b/drivers/staging/gasket/gasket_core.c @@ -925,6 +925,10 @@ do_map_region(const struct gasket_dev *gasket_dev, struct vm_area_struct *vma, gasket_get_bar_index(gasket_dev, (vma->vm_pgoff << PAGE_SHIFT) + driver_desc->legacy_mmap_address_offset); + + if (bar_index < 0) + return DO_MAP_REGION_INVALID; + phys_base = gasket_dev->bar_data[bar_index].phys_base + phys_offset; while (mapped_bytes < map_length) { /* |