lkml.org 
[lkml]   [2015]   [Oct]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH 4/9] usb/host/fotg210: Remove NULL checks dma_pool_destroy
Date
This patch remove NULL checks before calls to dma_pool_destroy() as the
function now can handle NULL pointers.

Signed-off-by: Peter Senna Tschudin <peter.senna@gmail.com>
---
drivers/usb/host/fotg210-hcd.c | 12 ++++--------
1 file changed, 4 insertions(+), 8 deletions(-)

diff --git a/drivers/usb/host/fotg210-hcd.c b/drivers/usb/host/fotg210-hcd.c
index 7f6aa99..54c2b05 100644
--- a/drivers/usb/host/fotg210-hcd.c
+++ b/drivers/usb/host/fotg210-hcd.c
@@ -1915,17 +1915,13 @@ static void fotg210_mem_cleanup(struct fotg210_hcd *fotg210)
fotg210->dummy = NULL;

/* DMA consistent memory and pools */
- if (fotg210->qtd_pool)
- dma_pool_destroy(fotg210->qtd_pool);
+ dma_pool_destroy(fotg210->qtd_pool);
fotg210->qtd_pool = NULL;

- if (fotg210->qh_pool) {
- dma_pool_destroy(fotg210->qh_pool);
- fotg210->qh_pool = NULL;
- }
+ dma_pool_destroy(fotg210->qh_pool);
+ fotg210->qh_pool = NULL;

- if (fotg210->itd_pool)
- dma_pool_destroy(fotg210->itd_pool);
+ dma_pool_destroy(fotg210->itd_pool);
fotg210->itd_pool = NULL;

if (fotg210->periodic)
--
2.1.0


\
 
 \ /
  Last update: 2015-10-12 23:41    [W:0.356 / U:0.100 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site