From: Boris Brezillon <boris.brezillon@free-electrons.com>
To: Masahiro Yamada <yamada.masahiro@socionext.com>
Cc: linux-mtd@lists.infradead.org, Leonard Crestez <leonard.crestez@nxp.com>
Subject: Re: [PATCH] fixup! mtd: nand: allocate aligned buffers if NAND_OWN_BUFFERS is unset
Date: Sun, 9 Apr 2017 09:09:47 +0200 [thread overview]
Message-ID: <20170409090947.7331df0b@bbrezillon> (raw)
In-Reply-To: <1491548798-28051-1-git-send-email-yamada.masahiro@socionext.com>
On Fri, 7 Apr 2017 16:06:38 +0900
Masahiro Yamada <yamada.masahiro@socionext.com> wrote:
> ---
>
> 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(-)
>
> 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) {
You mean
if (!(chip->options & NAND_OWN_BUFFERS) && chip->buffers) {
right?
I'll squash this change in you initial commit, but I have a comment on
where the real bug lies IMO (see my reply to "mtd: nand: allocate
aligned buffers if NAND_OWN_BUFFERS is unset").
> kfree(chip->buffers->databuf);
> kfree(chip->buffers->ecccode);
> kfree(chip->buffers->ecccalc);
next prev parent reply other threads:[~2017-04-09 7:10 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-04-07 7:06 [PATCH] fixup! mtd: nand: allocate aligned buffers if NAND_OWN_BUFFERS is unset Masahiro Yamada
2017-04-09 7:09 ` Boris Brezillon [this message]
2017-04-10 0:21 ` yamada.masahiro
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20170409090947.7331df0b@bbrezillon \
--to=boris.brezillon@free-electrons.com \
--cc=leonard.crestez@nxp.com \
--cc=linux-mtd@lists.infradead.org \
--cc=yamada.masahiro@socionext.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox