Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1245160
| From | Peter Senna Tschudin <peter.senna@gmail.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [PATCH 4/9] usb/host/fotg210: Remove NULL checks dma_pool_destroy |
| Date | 2015-10-12 23:30 +0200 |
| Message-ID | <qiSPq-2Lm-51@gated-at.bofh.it> (permalink) |
| References | <qbaT7-1N0-3@gated-at.bofh.it> <qiSPo-2Lm-25@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH 0/9] usb/host/fotg210: code style and warning fixes Peter Senna Tschudin <peter.senna@gmail.com> - 2015-10-12 23:30 +0200
[PATCH 6/9] usb/host/fotg210: replace msleep by usleep_range Peter Senna Tschudin <peter.senna@gmail.com> - 2015-10-12 23:30 +0200
[PATCH 4/9] usb/host/fotg210: Remove NULL checks dma_pool_destroy Peter Senna Tschudin <peter.senna@gmail.com> - 2015-10-12 23:30 +0200
[PATCH 8/9] usb/host/fotg210: Add function: output_buf_tds_dir() Peter Senna Tschudin <peter.senna@gmail.com> - 2015-10-12 23:30 +0200
[PATCH 3/9] usb/host/fotg210: Remove useless else statement Peter Senna Tschudin <peter.senna@gmail.com> - 2015-10-12 23:30 +0200
Re: [PATCH 3/9] usb/host/fotg210: Remove useless else statement Joe Perches <joe@perches.com> - 2015-10-13 00:10 +0200
[PATCH 3/9 V2] usb/host/fotg210: Remove return statement inside if Peter Senna Tschudin <peter.senna@gmail.com> - 2015-10-17 21:40 +0200
[PATCH 2/9] usb/host/fotg210: remove KERN_WARNING from pr_warn Peter Senna Tschudin <peter.senna@gmail.com> - 2015-10-12 23:30 +0200
[PATCH 7/9] usb/host/fotg210: convert macro to inline function Peter Senna Tschudin <peter.senna@gmail.com> - 2015-10-12 23:30 +0200
[PATCH 9/9] usb/host/fotg210: Add function scan_frame_queue() Peter Senna Tschudin <peter.senna@gmail.com> - 2015-10-12 23:30 +0200
[PATCH 5/9] usb/host/fotg210: change kmalloc by kmalloc_array Peter Senna Tschudin <peter.senna@gmail.com> - 2015-10-12 23:30 +0200
csiph-web