]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
staging: gasket: use NULL instead of 0 for null pointer
authorDmitriy Cherkasov <dmitriy@oss-tech.org>
Sat, 28 Jul 2018 22:55:24 +0000 (22:55 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 29 Jul 2018 06:05:45 +0000 (08:05 +0200)
Fixes sparse warning: Using plain integer as NULL pointer

Signed-off-by: Dmitriy Cherkasov <dmitriy@oss-tech.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/gasket/gasket_page_table.c

index 722839603f20dd7242134e7b24ba7a0b4945ebc2..b9304d221722b30461264d634e9011c9c080b38d 100644 (file)
@@ -1605,7 +1605,7 @@ int gasket_alloc_coherent_memory(struct gasket_dev *gasket_dev, u64 size,
 
        if (gasket_dev->page_table[index]->coherent_pages) {
                kfree(gasket_dev->page_table[index]->coherent_pages);
-               gasket_dev->page_table[index]->coherent_pages = 0;
+               gasket_dev->page_table[index]->coherent_pages = NULL;
        }
        gasket_dev->page_table[index]->num_coherent_pages = 0;
        return -ENOMEM;