[PATCH] USB: Removing NULL check for pool since dma_pool_destroy is safe
From: Salil Kapur
Date: Sat Aug 04 2018 - 03:10:26 EST
Removing NULL check for pool since dma_pool_destroy is safe
Signed-off-by: Salil Kapur <salilkapur93@xxxxxxxxx>
---
Âdrivers/usb/core/buffer.c | 8 ++------
Â1 file changed, 2 insertions(+), 6 deletions(-)
diff --git a/drivers/usb/core/buffer.c b/drivers/usb/core/buffer.c
index 77eef8acff94..f641342cdec0 100644
--- a/drivers/usb/core/buffer.c
+++ b/drivers/usb/core/buffer.c
@@ -101,12 +101,8 @@ void hcd_buffer_destroy(struct usb_hcd *hcd)
ÂÂÂÂ ÂÂÂ return;
Â
ÂÂÂÂ for (i = 0; i < HCD_BUFFER_POOLS; i++) {
-ÂÂÂ ÂÂÂ struct dma_pool *pool = hcd->pool[i];
-
-ÂÂÂ ÂÂÂ if (pool) {
-ÂÂÂ ÂÂÂ ÂÂÂ dma_pool_destroy(pool);
-ÂÂÂ ÂÂÂ ÂÂÂ hcd->pool[i] = NULL;
-ÂÂÂ ÂÂÂ }
+ÂÂÂ ÂÂÂ dma_pool_destroy(hcd->pool[i]);
+ÂÂÂ ÂÂÂ hcd->pool[i] = NULL;
ÂÂÂÂ }
Â}
Â
--
2.14.4