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>
This commit is contained in:
@@ -2117,8 +2117,7 @@ static int gr_remove(struct platform_device *pdev)
|
||||
return -EBUSY;
|
||||
|
||||
gr_dfs_delete(dev);
|
||||
if (dev->desc_pool)
|
||||
dma_pool_destroy(dev->desc_pool);
|
||||
dma_pool_destroy(dev->desc_pool);
|
||||
platform_set_drvdata(pdev, NULL);
|
||||
|
||||
gr_free_request(&dev->epi[0].ep, &dev->ep0reqi->req);
|
||||
|
Reference in New Issue
Block a user