forked from MIrrors/gasket-driver
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 <sumit686215@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
committed by
Alex Van Damme
parent
084dc17032
commit
1fa1af899a
@@ -1328,10 +1328,8 @@ nomem:
|
|||||||
num_pages * PAGE_SIZE, mem, handle);
|
num_pages * PAGE_SIZE, mem, handle);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (gasket_dev->page_table[index]->coherent_pages) {
|
kfree(gasket_dev->page_table[index]->coherent_pages);
|
||||||
kfree(gasket_dev->page_table[index]->coherent_pages);
|
gasket_dev->page_table[index]->coherent_pages = NULL;
|
||||||
gasket_dev->page_table[index]->coherent_pages = NULL;
|
|
||||||
}
|
|
||||||
gasket_dev->page_table[index]->num_coherent_pages = 0;
|
gasket_dev->page_table[index]->num_coherent_pages = 0;
|
||||||
return -ENOMEM;
|
return -ENOMEM;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user