forked from Minki/linux
usb: host: remove unnecessary condition check
dma_pool_destroy() can handle NULL pointer correctly, so there is no need to check NULL pointer before calling dma_pool_destroy(). Signed-off-by: Chengguang Xu <cgxu519@gmx.com> Acked-by: Alan Stern <stern@rowland.harvard.edu> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
157c0f2f64
commit
1d3e773ae0
@ -57,15 +57,11 @@ static int ohci_mem_init (struct ohci_hcd *ohci)
|
||||
|
||||
static void ohci_mem_cleanup (struct ohci_hcd *ohci)
|
||||
{
|
||||
if (ohci->td_cache) {
|
||||
dma_pool_destroy(ohci->td_cache);
|
||||
ohci->td_cache = NULL;
|
||||
}
|
||||
if (ohci->ed_cache) {
|
||||
dma_pool_destroy(ohci->ed_cache);
|
||||
ohci->ed_cache = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
/*-------------------------------------------------------------------------*/
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user