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>
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;
- }
+ dma_pool_destroy(ohci->td_cache);
+ ohci->td_cache = NULL;
+ dma_pool_destroy(ohci->ed_cache);
+ ohci->ed_cache = NULL;
}
/*-------------------------------------------------------------------------*/