Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752095AbdFTUYd (ORCPT ); Tue, 20 Jun 2017 16:24:33 -0400 Received: from gateway23.websitewelcome.com ([192.185.47.80]:11744 "EHLO gateway23.websitewelcome.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751144AbdFTUYb (ORCPT ); Tue, 20 Jun 2017 16:24:31 -0400 Date: Tue, 20 Jun 2017 15:24:27 -0500 From: "Gustavo A. R. Silva" To: Bin Liu , Greg Kroah-Hartman Cc: linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org, "Gustavo A. R. Silva" Subject: [PATCH] usb: musb: compress return logic into one line Message-ID: <20170620202427.GA9078@embeddedgus> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.5.23 (2014-03-12) X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - gator4166.hostgator.com X-AntiAbuse: Original Domain - vger.kernel.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - embeddedor.com X-BWhitelist: no X-Source-IP: 189.152.192.143 X-Exim-ID: 1dNPhM-000cTz-OD X-Source: X-Source-Args: X-Source-Dir: X-Source-Sender: (embeddedgus) [189.152.192.143]:40776 X-Source-Auth: garsilva@embeddedor.com X-Email-Count: 4 X-Source-Cap: Z3V6aWRpbmU7Z3V6aWRpbmU7Z2F0b3I0MTY2Lmhvc3RnYXRvci5jb20= Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1095 Lines: 34 Simplify return logic to avoid unnecessary variable assignment. Signed-off-by: Gustavo A. R. Silva --- drivers/usb/musb/musb_host.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/usb/musb/musb_host.c b/drivers/usb/musb/musb_host.c index dbe617a..76decb8 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, 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, -- 2.5.0