From: Miquel Raynal <miquel.raynal@bootlin.com>
To: Boris Brezillon <bbrezillon@kernel.org>
Cc: Richard Weinberger <richard@nod.at>,
stable@vger.kernel.org, Marek Vasut <marek.vasut@gmail.com>,
linux-mtd@lists.infradead.org,
Brian Norris <computersforpeace@gmail.com>,
David Woodhouse <dwmw2@infradead.org>
Subject: Re: [PATCH] mtd: spinand: Fix the error/cleanup path in spinand_init()
Date: Fri, 25 Jan 2019 12:07:51 +0100 [thread overview]
Message-ID: <20190125120751.3a66715e@xps13> (raw)
In-Reply-To: <20190124144654.27626-1-bbrezillon@kernel.org>
Hi Boris,
Boris Brezillon <bbrezillon@kernel.org> wrote on Thu, 24 Jan 2019
15:46:54 +0100:
> The manufacturer specific initialization has already been done when
> block unlocking takes place, and if anything goes wrong during this
> procedure we should call spinand_manufacturer_cleanup().
>
> Fixes: 7529df465248 ("mtd: nand: Add core infrastructure to support SPI NANDs")
> Cc: <stable@vger.kernel.org>
> Signed-off-by: Boris Brezillon <bbrezillon@kernel.org>
> ---
> drivers/mtd/nand/spi/core.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/mtd/nand/spi/core.c b/drivers/mtd/nand/spi/core.c
> index 8bf37da19663..fa87ae28cdfe 100644
> --- a/drivers/mtd/nand/spi/core.c
> +++ b/drivers/mtd/nand/spi/core.c
> @@ -1016,11 +1016,11 @@ static int spinand_init(struct spinand_device *spinand)
> for (i = 0; i < nand->memorg.ntargets; i++) {
> ret = spinand_select_target(spinand, i);
> if (ret)
> - goto err_free_bufs;
> + goto err_manuf_cleanup;
>
> ret = spinand_lock_block(spinand, BL_ALL_UNLOCKED);
> if (ret)
> - goto err_free_bufs;
> + goto err_manuf_cleanup;
> }
>
> ret = nanddev_init(nand, &spinand_ops, THIS_MODULE);
Acked-by: Miquel Raynal <miquel.raynal@bootlin.com>
Thanks,
Miquèl
______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/
next prev parent reply other threads:[~2019-01-25 11:08 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-01-24 14:46 [PATCH] mtd: spinand: Fix the error/cleanup path in spinand_init() Boris Brezillon
2019-01-25 11:07 ` Miquel Raynal [this message]
2019-01-31 11:32 ` Boris Brezillon
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=20190125120751.3a66715e@xps13 \
--to=miquel.raynal@bootlin.com \
--cc=bbrezillon@kernel.org \
--cc=computersforpeace@gmail.com \
--cc=dwmw2@infradead.org \
--cc=linux-mtd@lists.infradead.org \
--cc=marek.vasut@gmail.com \
--cc=richard@nod.at \
--cc=stable@vger.kernel.org \
/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