From patchwork Fri Apr 7 07:06:38 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Masahiro Yamada X-Patchwork-Id: 97014 Delivered-To: patch@linaro.org Received: by 10.140.89.233 with SMTP id v96csp157653qgd; Fri, 7 Apr 2017 00:07:39 -0700 (PDT) X-Received: by 10.99.170.2 with SMTP id e2mr40096304pgf.0.1491548859476; Fri, 07 Apr 2017 00:07:39 -0700 (PDT) Return-Path: Received: from bombadil.infradead.org (bombadil.infradead.org. [65.50.211.133]) by mx.google.com with ESMTPS id b67si4208588pgc.84.2017.04.07.00.07.39 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 07 Apr 2017 00:07:39 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-mtd-bounces+patch=linaro.org@lists.infradead.org designates 65.50.211.133 as permitted sender) client-ip=65.50.211.133; Authentication-Results: mx.google.com; dkim=pass header.i=@lists.infradead.org; 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 65.50.211.133 as permitted sender) smtp.mailfrom=linux-mtd-bounces+patch=linaro.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:Message-Id:Date: Subject:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To: References:List-Owner; bh=oz4QzJHwG6r5dTND57+/8d5osgcmaaY04TD9JWz82qs=; b=cAO hQKzkB7K7mEhsUwjYvYgv5QxOv2XPLzuGp6wwS0a4tFYWhexpPwkhx/z1eczvRQogfmsD/Xok0rRK k1X5DHReuiN8AiVSSv7Z7ziikoj+MCG8m8mp2Mc4EJSviZw36FKHjJyxxc5RQiSB2cBTlsFQn1U/e yxagCQsmotV3+nL1MYB+vhIsWwDiTcvnJXilXinL6KNs6OdKWfpeXO7U+636GfPhLEwSGQdpj1x5Z 8WSMEZP5UfXD5V99mdSaKT3Wu5QxClCh+3AXsDeZORYC0gGhfF1WFGzn3ux1Ekx2fBn1yiYY3N14v KP+QMS7tzz+MjG7xXT0zBnP21IbK1tg==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux)) id 1cwNzY-0000dl-OI; Fri, 07 Apr 2017 07:07:32 +0000 Received: from conuserg-08.nifty.com ([210.131.2.75]) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1cwNzU-0000ZS-Vv for linux-mtd@lists.infradead.org; Fri, 07 Apr 2017 07:07:31 +0000 Received: from pug.e01.socionext.com (p14092-ipngnfx01kyoto.kyoto.ocn.ne.jp [153.142.97.92]) (authenticated) by conuserg-08.nifty.com with ESMTP id v3776mdx002574; Fri, 7 Apr 2017 16:06:48 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conuserg-08.nifty.com v3776mdx002574 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.com; s=dec2015msa; t=1491548809; bh=uBR4aFpcx+9yujZL423iWufxajgKNY5EX7uF3fctvFU=; h=From:To:Cc:Subject:Date:From; b=ICpVMGX1KkdhZDiYJyd7wDtxkhHMI7w502AmADGBD8qtglIwITXXLjhrNYp45AYjA q10+WvA6p6zx/xPuEzz4b4Z+OMDYxXacDMcJ37Im8hHo+1nNvi1nnOvVdEq4NRD3Ls atbfwohnXy8fImoMuRWvEvinrj6jeSYracmgrq9v/9dZeY1RHNFO3Dk6lWt12DiiRr xUem4V9b6grkWti0QqiORxaXDAIchs40GCgo9T+S7uXv//SCEuFk8YyVntddIqjirj OXJZJ8tacVpCoASyNvwMynw5X6qfRkjHcs303/vHWPupbiNofor5AQRq+NUe9jqffq lPefIT1xqs06w== X-Nifty-SrcIP: [153.142.97.92] From: Masahiro Yamada To: linux-mtd@lists.infradead.org Subject: [PATCH] fixup! mtd: nand: allocate aligned buffers if NAND_OWN_BUFFERS is unset Date: Fri, 7 Apr 2017 16:06:38 +0900 Message-Id: <1491548798-28051-1-git-send-email-yamada.masahiro@socionext.com> X-Mailer: git-send-email 2.7.4 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20170407_000729_337327_3E020620 X-CRM114-Status: UNSURE ( 6.72 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -0.7 (/) X-Spam-Report: SpamAssassin version 3.4.1 on bombadil.infradead.org summary: Content analysis details: (-0.7 points) pts rule name description ---- ---------------------- -------------------------------------------------- 0.5 RCVD_IN_SORBS_SPAM RBL: SORBS: sender is a spam source [210.131.2.75 listed in dnsbl.sorbs.net] 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_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-BeenThere: linux-mtd@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: Linux MTD discussion mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Boris Brezillon , Leonard Crestez , Masahiro Yamada MIME-Version: 1.0 Sender: "linux-mtd" Errors-To: linux-mtd-bounces+patch=linaro.org@lists.infradead.org --- Bug port: http://patchwork.ozlabs.org/patch/745136/ Please squash into commit f6614d1b. (Currently, only once patch on top of that.) If impossible, I can re-send this with detailed log. drivers/mtd/nand/nand_base.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- 2.7.4 ______________________________________________________ Linux MTD discussion mailing list http://lists.infradead.org/mailman/listinfo/linux-mtd/ diff --git a/drivers/mtd/nand/nand_base.c b/drivers/mtd/nand/nand_base.c index 8a2e5ff..903a678 100644 --- a/drivers/mtd/nand/nand_base.c +++ b/drivers/mtd/nand/nand_base.c @@ -4936,7 +4936,7 @@ void nand_cleanup(struct nand_chip *chip) /* Free bad block table memory */ kfree(chip->bbt); - if (!(chip->options & NAND_OWN_BUFFERS)) { + if (!(chip->options & NAND_OWN_BUFFERS) && !chip->buffers) { kfree(chip->buffers->databuf); kfree(chip->buffers->ecccode); kfree(chip->buffers->ecccalc);