From patchwork Tue Apr 28 05:55:51 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Cao Minh Hiep X-Patchwork-Id: 6285831 X-Patchwork-Delegate: geert@linux-m68k.org Return-Path: X-Original-To: patchwork-linux-sh@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id CD524BEEE1 for ; Tue, 28 Apr 2015 05:56:02 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 0C4C220304 for ; Tue, 28 Apr 2015 05:56:02 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 3614020351 for ; Tue, 28 Apr 2015 05:56:01 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751766AbbD1Fz5 (ORCPT ); Tue, 28 Apr 2015 01:55:57 -0400 Received: from qecsay241.secure.ne.jp ([158.199.161.241]:57313 "HELO m119.secure.ne.jp" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with SMTP id S1751724AbbD1Fzz (ORCPT ); Tue, 28 Apr 2015 01:55:55 -0400 Received: (qmail 58882 invoked from network); 28 Apr 2015 14:55:52 +0900 Received: from unknown (HELO localhost) (61.118.107.10) by 0 with SMTP; 28 Apr 2015 14:55:52 +0900 From: Cao Minh Hiep To: geert+renesas@glider.be Cc: broonie@kernel.org, linux-spi@vger.kernel.org, kuninori.morimoto.gx@renesas.com, yoshihiro.shimoda.uh@renesas.com, ryusuke.sakato.bx@renesas.com, linux-sh@vger.kernel.org Subject: [PATCH 3/3] spi: Re-do the returning value of qspi_transfer_out_in Date: Tue, 28 Apr 2015 14:55:51 +0900 Message-Id: <1430200551-20708-4-git-send-email-cm-hiep@jinso.co.jp> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1430200551-20708-1-git-send-email-cm-hiep@jinso.co.jp> References: <1430200551-20708-1-git-send-email-cm-hiep@jinso.co.jp> Sender: linux-sh-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-sh@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Hiep Cao Minh To reduce complex of code, drop "ret" then qspi_transfer_out_in function should be returned the value of "qspi_trigger_transfer_out_in" directly. Signed-off-by: Hiep Cao Minh Acked-by: Geert Uytterhoeven --- drivers/spi/spi-rspi.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/drivers/spi/spi-rspi.c b/drivers/spi/spi-rspi.c index 3f65508..4a2cdac 100644 --- a/drivers/spi/spi-rspi.c +++ b/drivers/spi/spi-rspi.c @@ -768,12 +768,8 @@ static int qspi_transfer_out_in(struct rspi_data *rspi, if (ret != -EAGAIN) return ret; - ret = qspi_trigger_transfer_out_in(rspi, xfer->tx_buf, + return qspi_trigger_transfer_out_in(rspi, xfer->tx_buf, xfer->rx_buf, xfer->len); - if (ret < 0) - return ret; - - return 0; } static int qspi_transfer_out(struct rspi_data *rspi, struct spi_transfer *xfer)