[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20180717205712.29495-22-toddpoynor@gmail.com>
Date: Tue, 17 Jul 2018 13:57:01 -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>, Simon Que <sque@...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>
Subject: [PATCH 21/32] staging: gasket: remove unnecessary code in coherent allocator
From: Todd Poynor <toddpoynor@...gle.com>
Remove extraneous statement in gasket_config_coherent_allocator()
Reported-by: Dmitry Torokhov <dtor@...omium.org>
Signed-off-by: Zhongze Hu <frankhu@...omium.org>
Signed-off-by: Todd Poynor <toddpoynor@...gle.com>
---
drivers/staging/gasket/gasket_ioctl.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/drivers/staging/gasket/gasket_ioctl.c b/drivers/staging/gasket/gasket_ioctl.c
index ab2376c32c00b..0f6cb377cca47 100644
--- a/drivers/staging/gasket/gasket_ioctl.c
+++ b/drivers/staging/gasket/gasket_ioctl.c
@@ -419,10 +419,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(
--
2.18.0.203.gfac676dfb9-goog
Powered by blists - more mailing lists