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:
Chengguang Xu 2018-11-02 22:14:27 +08:00 committed by Greg Kroah-Hartman
parent 157c0f2f64
commit 1d3e773ae0

View File

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