mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] USB: Removing NULL check for pool since dma_pool_destroy is safe
@ 2018-08-04  7:10 Salil Kapur
  2018-08-05 14:27 ` Greg KH
  0 siblings, 1 reply; 4+ messages in thread
From: Salil Kapur @ 2018-08-04  7:10 UTC (permalink / raw)
  To: gregkh; +Cc: linux-usb, linux-kernel

Removing NULL check for pool since dma_pool_destroy is safe

Signed-off-by: Salil Kapur <salilkapur93@gmail.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


^ permalink raw reply	[flat|nested] 4+ messages in thread
* [PATCH] USB: Removing NULL check for pool since dma_pool_destroy is safe
@ 2018-08-06  4:28 Salil Kapur
  0 siblings, 0 replies; 4+ messages in thread
From: Salil Kapur @ 2018-08-06  4:28 UTC (permalink / raw)
  To: gregkh; +Cc: linux-usb, linux-kernel

Removing NULL check for pool since dma_pool_destroy is safe

Signed-off-by: Salil Kapur <salilkapur93@gmail.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


^ permalink raw reply	[flat|nested] 4+ messages in thread
* [PATCH] USB: Removing NULL check for pool since dma_pool_destroy is safe
@ 2018-08-28  1:24 Salil Kapur
  0 siblings, 0 replies; 4+ messages in thread
From: Salil Kapur @ 2018-08-28  1:24 UTC (permalink / raw)
  To: gregkh; +Cc: linux-usb, linux-kernel

Removing NULL check for pool since dma_pool_destroy is safe

Signed-off-by: Salil Kapur <salilkapur93@gmail.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


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2018-08-28  1:24 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-08-04  7:10 [PATCH] USB: Removing NULL check for pool since dma_pool_destroy is safe Salil Kapur
2018-08-05 14:27 ` Greg KH
2018-08-06  4:28 Salil Kapur
2018-08-28  1:24 Salil Kapur

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome