From: Salil Kapur Date: Mon, 6 Aug 2018 04:28:08 +0000 (-0700) Subject: USB: Removing NULL check for pool since dma_pool_destroy is safe X-Git-Tag: v4.20-rc1~109^2~114 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=71741bd6776aff40bc6e57d458a65d7e41190274;p=thirdparty%2Fkernel%2Flinux.git 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 Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/usb/core/buffer.c b/drivers/usb/core/buffer.c index 77eef8acff94e..f641342cdec09 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; } }