summaryrefslogtreecommitdiffstats
path: root/drivers/usb/host/ohci-mem.c
diff options
context:
space:
mode:
authorChengguang Xu <cgxu519@gmx.com>2018-11-02 22:14:27 +0800
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2018-11-07 13:22:06 +0100
commit1d3e773ae0a65a1b6b5d2aa21250c96f3e975aba (patch)
treeed9243a969b159521231e48ecbaf5f3f9b0957aa /drivers/usb/host/ohci-mem.c
parent157c0f2f641a9938382b092c64548ebdabfe25e0 (diff)
downloadtalos-op-linux-1d3e773ae0a65a1b6b5d2aa21250c96f3e975aba.tar.gz
talos-op-linux-1d3e773ae0a65a1b6b5d2aa21250c96f3e975aba.zip
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>
Diffstat (limited to 'drivers/usb/host/ohci-mem.c')
-rw-r--r--drivers/usb/host/ohci-mem.c12
1 files changed, 4 insertions, 8 deletions
diff --git a/drivers/usb/host/ohci-mem.c b/drivers/usb/host/ohci-mem.c
index b3da3f12e5b1..3965ac0341eb 100644
--- a/drivers/usb/host/ohci-mem.c
+++ b/drivers/usb/host/ohci-mem.c
@@ -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;
}
/*-------------------------------------------------------------------------*/
OpenPOWER on IntegriCloud