whci: drop null test before destroy functions
authorJulia Lawall <Julia.Lawall@lip6.fr>
Sun, 13 Sep 2015 12:15:11 +0000 (14:15 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 4 Oct 2015 09:38:33 +0000 (10:38 +0100)
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: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/host/whci/init.c

index d3e13b640d4ba28493f27ca99fc26cfd3677981f..e36372393bb1f8719293a3cc979c95c075277e85 100644 (file)
@@ -175,8 +175,7 @@ void whc_clean_up(struct whc *whc)
        pzl_clean_up(whc);
        asl_clean_up(whc);
 
-       if (whc->qset_pool)
-               dma_pool_destroy(whc->qset_pool);
+       dma_pool_destroy(whc->qset_pool);
 
        len   = resource_size(&whc->umc->resource);
        if (whc->base)
This page took 0.026312 seconds and 5 git commands to generate.