[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <b5db9a6d-6194-ae7c-235d-dce772cb9a4c@gmail.com>
Date: Sat, 4 Aug 2018 00:10:22 -0700
From: Salil Kapur <salilkapur93@...il.com>
To: gregkh@...uxfoundation.org
Cc: linux-usb@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: [PATCH] USB: Removing NULL check for pool since dma_pool_destroy is
safe
Removing NULL check for pool since dma_pool_destroy is safe
Signed-off-by: Salil Kapur <salilkapur93@...il.com>
---
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
Powered by blists - more mailing lists