diff options
author | Julia Lawall <Julia.Lawall@lip6.fr> | 2015-09-13 14:15:09 +0200 |
---|---|---|
committer | Felipe Balbi <balbi@ti.com> | 2015-09-21 14:42:36 -0500 |
commit | 51b91b7e6c1516c7d3ea70acc91aac9b32ae3e72 (patch) | |
tree | 7d20a849b0ca0f92120cbf21c2b157d3be601abb /drivers/usb/gadget/udc/mv_u3d_core.c | |
parent | 9a9ce1dfaef9aa15980cec22b806b39a65a9467e (diff) | |
download | op-kernel-dev-51b91b7e6c1516c7d3ea70acc91aac9b32ae3e72.zip op-kernel-dev-51b91b7e6c1516c7d3ea70acc91aac9b32ae3e72.tar.gz |
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/mv_u3d_core.c')
-rw-r--r-- | drivers/usb/gadget/udc/mv_u3d_core.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/usb/gadget/udc/mv_u3d_core.c b/drivers/usb/gadget/udc/mv_u3d_core.c index 4c48969..dafe74e 100644 --- a/drivers/usb/gadget/udc/mv_u3d_core.c +++ b/drivers/usb/gadget/udc/mv_u3d_core.c @@ -1767,8 +1767,7 @@ static int mv_u3d_remove(struct platform_device *dev) usb_del_gadget_udc(&u3d->gadget); /* free memory allocated in probe */ - if (u3d->trb_pool) - dma_pool_destroy(u3d->trb_pool); + dma_pool_destroy(u3d->trb_pool); if (u3d->ep_context) dma_free_coherent(&dev->dev, u3d->ep_context_size, |