Skip to contentSkip to conversation

staging: gasket: use NULL instead of 0 for null pointer

PATCH New Dmitriy Cherkasov 1 participant 1 message Jul 28, 2018 Staging

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 staging: gasket: use NULL instead of 0 for null pointer

Fixes sparse warning: Using plain integer as NULL pointer

---
 drivers/staging/gasket/gasket_page_table.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/staging/gasket/gasket_page_table.c +1 -1
index 9f81161..8fbfd58 100644
@@ -1689,7 +1689,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;
Signature · 1 line
1.9.1