]> git.proxmox.com Git - mirror_ubuntu-focal-kernel.git/commitdiff
usb: musb: compress return logic into one line
authorGustavo A. R. Silva <garsilva@embeddedor.com>
Wed, 21 Jun 2017 14:22:15 +0000 (09:22 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 27 Jun 2017 15:55:06 +0000 (17:55 +0200)
Simplify return logic to avoid unnecessary variable assignment.

Signed-off-by: Gustavo A. R. Silva <garsilva@embeddedor.com>
Acked-by: Bin Liu <b-liu@ti.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/musb/musb_host.c

index dbe617a735d8400576e53a84e488ea4ff9fc8466..76decb8011ebc2d37d3e7e64a394bd2bb6e5c8ba 100644 (file)
@@ -1540,7 +1540,7 @@ static int musb_rx_dma_iso_cppi41(struct dma_controller *dma,
        struct dma_channel *channel = hw_ep->rx_channel;
        void __iomem *epio = hw_ep->regs;
        dma_addr_t *buf;
-       u32 length, res;
+       u32 length;
        u16 val;
 
        buf = (void *)urb->iso_frame_desc[qh->iso_idx].offset +
@@ -1552,10 +1552,8 @@ static int musb_rx_dma_iso_cppi41(struct dma_controller *dma,
        val |= MUSB_RXCSR_DMAENAB;
        musb_writew(hw_ep->regs, MUSB_RXCSR, val);
 
-       res = dma->channel_program(channel, qh->maxpacket, 0,
+       return dma->channel_program(channel, qh->maxpacket, 0,
                                   (u32)buf, length);
-
-       return res;
 }
 #else
 static inline int musb_rx_dma_iso_cppi41(struct dma_controller *dma,