From patchwork Mon May 13 06:55:52 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wei Yongjun X-Patchwork-Id: 243305 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from casper.infradead.org (casper.infradead.org [IPv6:2001:770:15f::2]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id F08572C008E for ; Mon, 13 May 2013 17:00:28 +1000 (EST) Received: from merlin.infradead.org ([2001:4978:20e::2]) by casper.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1Ubmge-0006GB-TG; Mon, 13 May 2013 06:56:47 +0000 Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1UbmgD-0005aM-IK; Mon, 13 May 2013 06:56:17 +0000 Received: from mail-bk0-x234.google.com ([2a00:1450:4008:c01::234]) by merlin.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1UbmgA-0005Yp-9a for linux-mtd@lists.infradead.org; Mon, 13 May 2013 06:56:16 +0000 Received: by mail-bk0-f52.google.com with SMTP id mz1so33602bkb.25 for ; Sun, 12 May 2013 23:55:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:x-received:date:message-id:subject:from:to:cc :content-type; bh=1JTKamrL0eQJn1cPUt8vNSSfsOtZ3TgIi5rIHo2A0S0=; b=b23HIvUP4Tx0Qelvr7bVwtX3dJ9msRlj4Zc4V66dkQBphNNH/pP0ou22KjxbMFROnE rVdP9e+c0yUOrr44a4UYC6KixOfgOup5vwUgIaSGpp6tec06Q7tTpfl5rppucM1uPrzX Kj6zxg0vd/z4aaahaY/d/b4D5jks/TqpPzUidwbtBS0hDMkhZieCC1JJe7ctRa48blo/ 1h2L+EA3TqRQn5I8LORY6fjplbth7RCDkNRdU6AYpZyZgO46Q6EOFCwaYG7ASIM/tPoW 5Q4wZj30lgt+ztXAL1P0NeSXcWcOTmRNP8aoNa7uOKdTUSbw73smOoCXWwlufheFwDPo MnvQ== MIME-Version: 1.0 X-Received: by 10.204.173.9 with SMTP id n9mr5151607bkz.47.1368428152294; Sun, 12 May 2013 23:55:52 -0700 (PDT) Received: by 10.204.199.129 with HTTP; Sun, 12 May 2013 23:55:52 -0700 (PDT) Date: Mon, 13 May 2013 14:55:52 +0800 Message-ID: Subject: [PATCH] mtd: fsmc_nand: fix error return code in fsmc_nand_probe() From: Wei Yongjun To: dwmw2@infradead.org, grant.likely@linaro.org, rob.herring@calxeda.com, artem.bityutskiy@linux.intel.com, linus.walleij@linaro.org, viresh.kumar@linaro.org, vipin.kumar@st.com X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20130513_025614_496718_73640D92 X-CRM114-Status: UNSURE ( 8.47 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -2.0 (--) X-Spam-Report: SpamAssassin version 3.3.2 on merlin.infradead.org summary: Content analysis details: (-2.0 points) pts rule name description ---- ---------------------- -------------------------------------------------- 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 -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] -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 Cc: yongjun_wei@trendmicro.com.cn, linux-mtd@lists.infradead.org, devicetree-discuss@lists.ozlabs.org, linux-kernel@vger.kernel.org X-BeenThere: linux-mtd@lists.infradead.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: Linux MTD discussion mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-mtd" Errors-To: linux-mtd-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org From: Wei Yongjun Fix to return -ENODEV in the dma channel request error handling case instead of 0, as done elsewhere in this function. Signed-off-by: Wei Yongjun --- drivers/mtd/nand/fsmc_nand.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/mtd/nand/fsmc_nand.c b/drivers/mtd/nand/fsmc_nand.c index 911e243..6988fc8 100644 --- a/drivers/mtd/nand/fsmc_nand.c +++ b/drivers/mtd/nand/fsmc_nand.c @@ -1032,6 +1032,7 @@ static int __init fsmc_nand_probe(struct platform_device *pdev) case USE_DMA_ACCESS: dma_cap_zero(mask); dma_cap_set(DMA_MEMCPY, mask); + ret = -ENODEV; host->read_dma_chan = dma_request_channel(mask, filter, pdata->read_dma_priv); if (!host->read_dma_chan) {