staging: dwc2: fix useless test for non-0
authorPaul Zimmerman <Paul.Zimmerman@synopsys.com>
Mon, 25 Nov 2013 21:42:46 +0000 (13:42 -0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 3 Dec 2013 16:31:09 +0000 (08:31 -0800)
In dwc2_xfercomp_isoc_split_in(), the function has already exited
if len == 0, so no need to test it again

Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Paul Zimmerman <paulz@synopsys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/dwc2/hcd_intr.c

index 50e6de54f0f0f2c6989897e0ba8fcb26116424ea..012f17ec1a37d3fa6b60f0a289e547e5cf054381 100644 (file)
@@ -935,7 +935,7 @@ static int dwc2_xfercomp_isoc_split_in(struct dwc2_hsotg *hsotg,
 
        frame_desc->actual_length += len;
 
-       if (chan->align_buf && len) {
+       if (chan->align_buf) {
                dev_vdbg(hsotg->dev, "%s(): non-aligned buffer\n", __func__);
                dma_sync_single_for_cpu(hsotg->dev, qtd->urb->dma,
                                        qtd->urb->length, DMA_FROM_DEVICE);