From patchwork Wed Apr 3 13:06:40 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wei Yongjun X-Patchwork-Id: 2387261 Return-Path: X-Original-To: patchwork-spi-devel-general@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from lists.sourceforge.net (lists.sourceforge.net [216.34.181.88]) by patchwork2.kernel.org (Postfix) with ESMTP id D6646DFB79 for ; Wed, 3 Apr 2013 13:06:54 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=sfs-ml-3.v29.ch3.sourceforge.com) by sfs-ml-3.v29.ch3.sourceforge.com with esmtp (Exim 4.76) (envelope-from ) id 1UNNOt-0002Q5-IC; Wed, 03 Apr 2013 13:06:51 +0000 Received: from sog-mx-2.v43.ch3.sourceforge.com ([172.29.43.192] helo=mx.sourceforge.net) by sfs-ml-3.v29.ch3.sourceforge.com with esmtp (Exim 4.76) (envelope-from ) id 1UNNOr-0002Pr-U6 for spi-devel-general@lists.sourceforge.net; Wed, 03 Apr 2013 13:06:49 +0000 Received-SPF: pass (sog-mx-2.v43.ch3.sourceforge.com: domain of gmail.com designates 209.85.214.44 as permitted sender) client-ip=209.85.214.44; envelope-from=weiyj.lk@gmail.com; helo=mail-bk0-f44.google.com; Received: from mail-bk0-f44.google.com ([209.85.214.44]) by sog-mx-2.v43.ch3.sourceforge.com with esmtps (TLSv1:RC4-SHA:128) (Exim 4.76) id 1UNNOp-0004e2-8o for spi-devel-general@lists.sourceforge.net; Wed, 03 Apr 2013 13:06:49 +0000 Received: by mail-bk0-f44.google.com with SMTP id jk13so825095bkc.31 for ; Wed, 03 Apr 2013 06:06:40 -0700 (PDT) MIME-Version: 1.0 X-Received: by 10.204.238.133 with SMTP id ks5mr1221422bkb.101.1364994400801; Wed, 03 Apr 2013 06:06:40 -0700 (PDT) Received: by 10.204.30.210 with HTTP; Wed, 3 Apr 2013 06:06:40 -0700 (PDT) Date: Wed, 3 Apr 2013 21:06:40 +0800 Message-ID: Subject: [PATCH -next] mxs/spi: fix error return code in mxs_spi_probe() From: Wei Yongjun To: grant.likely@secretlab.ca, broonie@opensource.wolfsonmicro.com, rob.herring@calxeda.com X-Spam-Score: -1.6 (-) X-Spam-Report: Spam Filtering performed by mx.sourceforge.net. See http://spamassassin.org/tag/ for more details. -1.5 SPF_CHECK_PASS SPF reports sender host as permitted sender for sender-domain 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (weiyj.lk[at]gmail.com) -0.0 SPF_PASS SPF: sender matches SPF record -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature X-Headers-End: 1UNNOp-0004e2-8o Cc: spi-devel-general@lists.sourceforge.net, yongjun_wei@trendmicro.com.cn, devicetree-discuss@lists.ozlabs.org, linux-kernel@vger.kernel.org X-BeenThere: spi-devel-general@lists.sourceforge.net X-Mailman-Version: 2.1.9 Precedence: list List-Id: Linux SPI core/device drivers discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: spi-devel-general-bounces@lists.sourceforge.net From: Wei Yongjun Fix to return a negative error code from the error handling case instead of 0, as returned elsewhere in this function. Signed-off-by: Wei Yongjun --- drivers/spi/spi-mxs.c | 1 + 1 file changed, 1 insertion(+) ------------------------------------------------------------------------------ Minimize network downtime and maximize team effectiveness. Reduce network management and security costs.Learn how to hire the most talented Cisco Certified professionals. Visit the Employer Resources Portal http://www.cisco.com/web/learning/employer_resources/index.html diff --git a/drivers/spi/spi-mxs.c b/drivers/spi/spi-mxs.c index 7b1c014..8498276 100644 --- a/drivers/spi/spi-mxs.c +++ b/drivers/spi/spi-mxs.c @@ -570,6 +570,7 @@ static int mxs_spi_probe(struct platform_device *pdev) ssp->dmach = dma_request_slave_channel(&pdev->dev, "rx-tx"); if (!ssp->dmach) { dev_err(ssp->dev, "Failed to request DMA\n"); + ret = -ENODEV; goto out_master_free; }