From patchwork Fri Nov 4 10:42:50 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Masahiro Yamada X-Patchwork-Id: 80809 Delivered-To: patch@linaro.org Received: by 10.140.97.247 with SMTP id m110csp1078802qge; Fri, 4 Nov 2016 03:42:18 -0700 (PDT) X-Received: by 10.99.106.200 with SMTP id f191mr21140975pgc.143.1478256138692; Fri, 04 Nov 2016 03:42:18 -0700 (PDT) Return-Path: Received: from bombadil.infradead.org (bombadil.infradead.org. [2001:1868:205::9]) by mx.google.com with ESMTPS id 197si15658187pfy.74.2016.11.04.03.42.18 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 04 Nov 2016 03:42:18 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-mtd-bounces+patch=linaro.org@lists.infradead.org designates 2001:1868:205::9 as permitted sender) client-ip=2001:1868:205::9; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@nifty.com; spf=pass (google.com: best guess record for domain of linux-mtd-bounces+patch=linaro.org@lists.infradead.org designates 2001:1868:205::9 as permitted sender) smtp.mailfrom=linux-mtd-bounces+patch=linaro.org@lists.infradead.org Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.85_2 #1 (Red Hat Linux)) id 1c2bwp-0006Oo-30; Fri, 04 Nov 2016 10:42:11 +0000 Received: from conuserg-07.nifty.com ([210.131.2.74]) by bombadil.infradead.org with esmtps (Exim 4.85_2 #1 (Red Hat Linux)) id 1c2bw1-0005Ow-Md for linux-mtd@lists.infradead.org; Fri, 04 Nov 2016 10:41:27 +0000 Received: from beagle.diag.org (p14092-ipngnfx01kyoto.kyoto.ocn.ne.jp [153.142.97.92]) (authenticated) by conuserg-07.nifty.com with ESMTP id uA4AebSl028031; Fri, 4 Nov 2016 19:40:40 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conuserg-07.nifty.com uA4AebSl028031 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.com; s=dec2015msa; t=1478256040; bh=DJWSMsrKedOsdEdEwUQIwWKjZri0xCfdSCUT5akuwpo=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=2aK/pW2JrtiVGT0UE6fyyfaR5vq46wInAN7/omlFABCXKBU3SyTWBGlbX8Ld6O/7z LwRTjXhV/mqOXEOlAVq62rC/CXNoohTUVjEDc38mOV9nUAYEyMNTeeFV2ZvN/5WaAk 6IV3s+iKm2+69XyiqZnt88k2V9tGRgSALlH+kDuTv5reAn1ay4YSDZCSPeQoV+4z7Z AotLwxpbehXvw5yh0FE9Ml27tI00qGCrapKDT5sYzY7yo5h6cAziEQcRH6PK9eVCk0 9cXNQA2xfGh10AoCW+9oUBFR4JZ6eJbgCMpdn4S80gVIMuxMS7VsU7wbfXB2RRoKYN BzBX8zJMAC9EQ== X-Nifty-SrcIP: [153.142.97.92] From: Masahiro Yamada To: linux-mtd@lists.infradead.org Subject: [PATCH 02/22] mtd: nand: cmx270: return error code of nand_scan() on error Date: Fri, 4 Nov 2016 19:42:50 +0900 Message-Id: <1478256190-7452-3-git-send-email-yamada.masahiro@socionext.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1478256190-7452-1-git-send-email-yamada.masahiro@socionext.com> References: <1478256190-7452-1-git-send-email-yamada.masahiro@socionext.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20161104_034122_335421_4AE64970 X-CRM114-Status: GOOD ( 11.10 ) X-Spam-Score: -1.2 (-) X-Spam-Report: SpamAssassin version 3.4.0 on bombadil.infradead.org summary: Content analysis details: (-1.2 points) pts rule name description ---- ---------------------- -------------------------------------------------- 0.7 SPF_SOFTFAIL SPF: sender does not match SPF record (softfail) -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid X-BeenThere: linux-mtd@lists.infradead.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: Linux MTD discussion mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Boris Brezillon , Richard Weinberger , linux-kernel@vger.kernel.org, Masahiro Yamada , Brian Norris , David Woodhouse MIME-Version: 1.0 Sender: "linux-mtd" Errors-To: linux-mtd-bounces+patch=linaro.org@lists.infradead.org The nand_scan() returns an appropriate error value when it fails. Use it instead of the fixed error code -ENXIO. Signed-off-by: Masahiro Yamada --- drivers/mtd/nand/cmx270_nand.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) -- 1.9.1 ______________________________________________________ Linux MTD discussion mailing list http://lists.infradead.org/mailman/listinfo/linux-mtd/ diff --git a/drivers/mtd/nand/cmx270_nand.c b/drivers/mtd/nand/cmx270_nand.c index 4913378..226ac0b 100644 --- a/drivers/mtd/nand/cmx270_nand.c +++ b/drivers/mtd/nand/cmx270_nand.c @@ -195,9 +195,9 @@ static int __init cmx270_init(void) this->write_buf = cmx270_write_buf; /* Scan to find existence of the device */ - if (nand_scan (cmx270_nand_mtd, 1)) { + ret = nand_scan(cmx270_nand_mtd, 1); + if (ret) { pr_notice("No NAND device\n"); - ret = -ENXIO; goto err_scan; }