staging: gasket: remove unnecessary code in coherent allocator
authorTodd Poynor <toddpoynor@google.com>
Fri, 20 Jul 2018 03:49:05 +0000 (20:49 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 21 Jul 2018 06:50:35 +0000 (08:50 +0200)
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>
drivers/staging/gasket/gasket_ioctl.c

index 0c2f85c..d0142ed 100644 (file)
@@ -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(