]> git.openfabrics.org - ~shefty/rdma-dev.git/commitdiff
xhci-mem.c: xhci_segment_free: No need for checking seg argument
authorKautuk Consul <consul.kautuk@gmail.com>
Mon, 19 Sep 2011 23:53:16 +0000 (16:53 -0700)
committerGreg Kroah-Hartman <gregkh@suse.de>
Tue, 20 Sep 2011 19:40:32 +0000 (12:40 -0700)
The seg argument to xhci_segment_free is never passed as NULL, so
no need to check for this in xhci_segment_free.

Signed-off-by: Kautuk Consul <consul.kautuk@gmail.com>
Signed-off-by: Sarah Sharp <sarah.a.sharp@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/usb/host/xhci-mem.c

index e4513ab015b40826b4b65d99268466e5ce0a0b59..bc6ec0cb3c6189cfd56969986b186cbf510e2068 100644 (file)
@@ -61,8 +61,6 @@ static struct xhci_segment *xhci_segment_alloc(struct xhci_hcd *xhci, gfp_t flag
 
 static void xhci_segment_free(struct xhci_hcd *xhci, struct xhci_segment *seg)
 {
-       if (!seg)
-               return;
        if (seg->trbs) {
                xhci_dbg(xhci, "Freeing DMA segment at %p (virtual) 0x%llx (DMA)\n",
                                seg->trbs, (unsigned long long)seg->dma);