diff options
author | Gustavo A. R. Silva <garsilva@embeddedor.com> | 2017-06-21 10:22:15 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2017-06-27 11:55:06 -0400 |
commit | c68bb0ef177bbcaba505ed492101095c613dafa6 (patch) | |
tree | aa863ec0af365f22820c7be7191031374e9cf804 | |
parent | 17129d4702fa1969e2e20357e92cae0277819b47 (diff) |
usb: musb: compress return logic into one line
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>
-rw-r--r-- | drivers/usb/musb/musb_host.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/usb/musb/musb_host.c b/drivers/usb/musb/musb_host.c index dbe617a735d8..76decb8011eb 100644 --- a/drivers/usb/musb/musb_host.c +++ b/drivers/usb/musb/musb_host.c | |||
@@ -1540,7 +1540,7 @@ static int musb_rx_dma_iso_cppi41(struct dma_controller *dma, | |||
1540 | struct dma_channel *channel = hw_ep->rx_channel; | 1540 | struct dma_channel *channel = hw_ep->rx_channel; |
1541 | void __iomem *epio = hw_ep->regs; | 1541 | void __iomem *epio = hw_ep->regs; |
1542 | dma_addr_t *buf; | 1542 | dma_addr_t *buf; |
1543 | u32 length, res; | 1543 | u32 length; |
1544 | u16 val; | 1544 | u16 val; |
1545 | 1545 | ||
1546 | buf = (void *)urb->iso_frame_desc[qh->iso_idx].offset + | 1546 | 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, | |||
1552 | val |= MUSB_RXCSR_DMAENAB; | 1552 | val |= MUSB_RXCSR_DMAENAB; |
1553 | musb_writew(hw_ep->regs, MUSB_RXCSR, val); | 1553 | musb_writew(hw_ep->regs, MUSB_RXCSR, val); |
1554 | 1554 | ||
1555 | res = dma->channel_program(channel, qh->maxpacket, 0, | 1555 | return dma->channel_program(channel, qh->maxpacket, 0, |
1556 | (u32)buf, length); | 1556 | (u32)buf, length); |
1557 | |||
1558 | return res; | ||
1559 | } | 1557 | } |
1560 | #else | 1558 | #else |
1561 | static inline int musb_rx_dma_iso_cppi41(struct dma_controller *dma, | 1559 | static inline int musb_rx_dma_iso_cppi41(struct dma_controller *dma, |