summaryrefslogtreecommitdiff
path: root/drivers/usb/gadget/udc/bdc
diff options
context:
space:
mode:
authorJulia Lawall <Julia.Lawall@lip6.fr>2015-09-13 15:15:09 +0300
committerFelipe Balbi <balbi@ti.com>2015-09-21 22:42:36 +0300
commit51b91b7e6c1516c7d3ea70acc91aac9b32ae3e72 (patch)
tree7d20a849b0ca0f92120cbf21c2b157d3be601abb /drivers/usb/gadget/udc/bdc
parent9a9ce1dfaef9aa15980cec22b806b39a65a9467e (diff)
downloadlinux-51b91b7e6c1516c7d3ea70acc91aac9b32ae3e72.tar.xz
usb: gadget: drop null test before destroy functions
Remove unneeded NULL test. The semantic patch that makes this change is as follows: (http://coccinelle.lip6.fr/) // <smpl> @@ expression x; @@ -if (x != NULL) \(kmem_cache_destroy\|mempool_destroy\|dma_pool_destroy\)(x); // </smpl> Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr> Signed-off-by: Felipe Balbi <balbi@ti.com>
Diffstat (limited to 'drivers/usb/gadget/udc/bdc')
-rw-r--r--drivers/usb/gadget/udc/bdc/bdc_core.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/usb/gadget/udc/bdc/bdc_core.c b/drivers/usb/gadget/udc/bdc/bdc_core.c
index 5c8f4effb62a..ccb9c213cc9f 100644
--- a/drivers/usb/gadget/udc/bdc/bdc_core.c
+++ b/drivers/usb/gadget/udc/bdc/bdc_core.c
@@ -324,8 +324,7 @@ static void bdc_mem_free(struct bdc *bdc)
bdc->scratchpad.buff, bdc->scratchpad.sp_dma);
/* Destroy the dma pools */
- if (bdc->bd_table_pool)
- dma_pool_destroy(bdc->bd_table_pool);
+ dma_pool_destroy(bdc->bd_table_pool);
/* Free the bdc_ep array */
kfree(bdc->bdc_ep_array);