summaryrefslogtreecommitdiffstats
path: root/drivers/staging/gasket/gasket_ioctl.c
diff options
context:
space:
mode:
authorTodd Poynor <toddpoynor@google.com>2018-07-19 20:49:05 -0700
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2018-07-21 08:50:35 +0200
commited6e96c7951b85bb5c6a50503baa2fd9bfbb0510 (patch)
treef0fcd198cd585e3820b62d71b9858d5171dce8d3 /drivers/staging/gasket/gasket_ioctl.c
parentae27b2f9f76afc7bf77ef6001ba47fad43a9fce3 (diff)
staging: gasket: remove unnecessary code in coherent allocator
Remove extraneous statement in gasket_config_coherent_allocator() Reported-by: Dmitry Torokhov <dtor@chromium.org> Signed-off-by: Zhongze Hu <frankhu@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/gasket_ioctl.c')
-rw-r--r--drivers/staging/gasket/gasket_ioctl.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/staging/gasket/gasket_ioctl.c b/drivers/staging/gasket/gasket_ioctl.c
index 0c2f85cf5448..d0142ed048a6 100644
--- a/drivers/staging/gasket/gasket_ioctl.c
+++ b/drivers/staging/gasket/gasket_ioctl.c
@@ -420,10 +420,8 @@ static int gasket_config_coherent_allocator(
if (ibuf.page_table_index >= gasket_dev->num_page_tables)
return -EFAULT;
- if (ibuf.size > PAGE_SIZE * MAX_NUM_COHERENT_PAGES) {
- ibuf.size = PAGE_SIZE * MAX_NUM_COHERENT_PAGES;
+ if (ibuf.size > PAGE_SIZE * MAX_NUM_COHERENT_PAGES)
return -ENOMEM;
- }
if (ibuf.enable == 0) {
ret = gasket_free_coherent_memory(