Skip to contentSkip to conversation

staging: gasket: remove unnecessary code in coherent allocator

PATCH RESEND New Todd Poynor 1 participant 1 message Jul 15, 2018 Staging

lore
Share & tools
lore
#0 lore raw

PATCH RESEND 1/1 staging: gasket: remove unnecessary code in coherent allocator

From: Todd Poynor <[email protected]>

Remove extraneous statement in gasket_config_coherent_allocator()

---
 drivers/staging/gasket/gasket_ioctl.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)
drivers/staging/gasket/gasket_ioctl.c +1 -3
index 0c2f85cf5448..d0142ed048a6 100644
@@ -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(
Signature · 4 lines
2.18.0.203.gfac676dfb9-goog

Resending, extracted from the previous stack of patches that needs
other cleanups.