staging: gasket: remove null ptr check before kfree
PATCH 1/1 staging: gasket: remove null ptr check before kfree
Remove null ptr check before kfree because kfree is null ptr safe. Issue found by checkpatch.
Signed-off-by Sumit Kumar <[email protected]>
--- drivers/staging/gasket/gasket_page_table.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-)
drivers/staging/gasket/gasket_page_table.c +2 -4
@@ -1328,10 +1328,8 @@ int gasket_alloc_coherent_memory(struct gasket_dev *gasket_dev, u64 size, num_pages * PAGE_SIZE, mem, handle); } -if (gasket_dev->page_table[index]->coherent_pages) { -kfree (gasket_dev->page_table[index]->coherent_pages); - gasket_dev->page_table[index]->coherent_pages =NULL ; - } +kfree (gasket_dev->page_table[index]->coherent_pages); + gasket_dev->page_table[index]->coherent_pages =NULL ; gasket_dev->page_table[index]->num_coherent_pages =0 ;return -ENOMEM ; }
Signature · 1 line
2.7.4
Greg Kroah-Hartman
maintainerQuoted 4 lines · Sumit Kumar
Remove null ptr check before kfree because kfree is null ptr safe. Issue found by checkpatch.
Signed-off-by Sumit Kumar <[email protected]>
Do not use fake email addresses in a signed-off-by line :(