Commit 1d3e773a authored by Chengguang Xu's avatar Chengguang Xu Committed by Greg Kroah-Hartman
Browse files

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: default avatarChengguang Xu <cgxu519@gmx.com>
Acked-by: default avatarAlan Stern <stern@rowland.harvard.edu>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 157c0f2f
Loading
Loading
Loading
Loading
+4 −8
Original line number Diff line number Diff line
@@ -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;
}
}

/*-------------------------------------------------------------------------*/