diff options
author | Salil Kapur <salilkapur93@gmail.com> | 2018-08-06 00:28:08 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2018-09-10 14:01:04 -0400 |
commit | 71741bd6776aff40bc6e57d458a65d7e41190274 (patch) | |
tree | e01dd04479832a7fe87f63627f7d999f168b86ef /drivers/usb/core/buffer.c | |
parent | 4e69817b106e4fb98f7af463d2f951e7b3603c12 (diff) |
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@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/usb/core/buffer.c')
-rw-r--r-- | drivers/usb/core/buffer.c | 8 |
1 files 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) | |||
101 | return; | 101 | return; |
102 | 102 | ||
103 | for (i = 0; i < HCD_BUFFER_POOLS; i++) { | 103 | for (i = 0; i < HCD_BUFFER_POOLS; i++) { |
104 | struct dma_pool *pool = hcd->pool[i]; | 104 | dma_pool_destroy(hcd->pool[i]); |
105 | 105 | hcd->pool[i] = NULL; | |
106 | if (pool) { | ||
107 | dma_pool_destroy(pool); | ||
108 | hcd->pool[i] = NULL; | ||
109 | } | ||
110 | } | 106 | } |
111 | } | 107 | } |
112 | 108 | ||