[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20180721125713.88501-15-toddpoynor@gmail.com>
Date: Sat, 21 Jul 2018 05:56:53 -0700
From: Todd Poynor <toddpoynor@...il.com>
To: Rob Springer <rspringer@...gle.com>,
John Joseph <jnjoseph@...gle.com>,
Ben Chan <benchan@...omium.org>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>
Cc: Zhongze Hu <frankhu@...omium.org>,
Dmitry Torokhov <dtor@...omium.org>,
Guenter Roeck <groeck@...omium.org>,
devel@...verdev.osuosl.org, linux-kernel@...r.kernel.org,
Todd Poynor <toddpoynor@...gle.com>,
Simon Que <sque@...omium.org>
Subject: [PATCH 07/20] staging: gasket: gasket_mmap return error instead of valid BAR index
From: Todd Poynor <toddpoynor@...gle.com>
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@...omium.org>
Signed-off-by: Todd Poynor <toddpoynor@...gle.com>
---
drivers/staging/gasket/gasket_core.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/staging/gasket/gasket_core.c b/drivers/staging/gasket/gasket_core.c
index eb5ad161ccda2..3cf918f9d2604 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;
--
2.18.0.233.g985f88cf7e-goog
Powered by blists - more mailing lists